CloneSet232


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
48201.000class_member_declarations[9]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14773
src/NHibernate/Type/TimeAsTimeSpanType.cs
24869
src/NHibernate/Type/TimeSpanType.cs
Clone Instance
1
Line Count
47
Source Line
73
Source File
src/NHibernate/Type/TimeAsTimeSpanType.cs

                public override string ToString(object val)
                {
                        return ((TimeSpan)val).Ticks.ToString();
                }

                #region IVersionType Members

                public object Next(object current, ISessionImplementor session)
                {
                        return Seed(session);
                }

                public virtual object Seed(ISessionImplementor session)
                {
                        return new TimeSpan(DateTime.Now.Ticks);
                }

                public object StringToObject(string xml)
                {
                        return TimeSpan.Parse(xml);
                }

                public IComparer Comparator
                {
                        get { return Comparer<TimeSpan>.Default;
                            }
                }

                #endregion
                public override object FromStringValue(string xml)
                {
                        return TimeSpan.Parse(xml);
                }

                public override System.Type PrimitiveClass
                {
                        get { return typeof(TimeSpan);
                            }
                }

                public override object DefaultValue
                {
                        get { return TimeSpan.Zero;
                            }
                }

                public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
                {
                        return '\'' + ((TimeSpan)value).Ticks.ToString() + '\'';
                }



Clone Instance
2
Line Count
48
Source Line
69
Source File
src/NHibernate/Type/TimeSpanType.cs

                public override string ToString(object val)
                {
                        return ((TimeSpan)val).Ticks.ToString();
                }

                #region IVersionType Members

                public object Next(object current, ISessionImplementor session)
                {
                        return Seed(session);
                }

                /// <summary></summary>
                public virtual object Seed(ISessionImplementor session)
                {
                        return new TimeSpan(DateTime.Now.Ticks);
                }

                public object StringToObject(string xml)
                {
                        return TimeSpan.Parse(xml);
                }

                public IComparer Comparator
                {
                        get { return Comparer<TimeSpan>.Default;
                            }
                }

                #endregion
                public override object FromStringValue(string xml)
                {
                        return TimeSpan.Parse(xml);
                }

                public override System.Type PrimitiveClass
                {
                        get { return typeof(TimeSpan);
                            }
                }

                public override object DefaultValue
                {
                        get { return TimeSpan.Zero;
                            }
                }

                public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
                {
                        return '\'' + ((TimeSpan)value).Ticks.ToString() + '\'';
                }



Clone AbstractionParameter Count: 0Parameter Bindings

public override string ToString(object val)
{
   return ((TimeSpan)val).Ticks.ToString();
}

#region IVersionType Members
public object Next(object current, ISessionImplementor session)
{
   return Seed(session);
}

/// <summary></summary>
public virtual object Seed(ISessionImplementor session)
{
   return new TimeSpan(DateTime.Now.Ticks);
}

public object StringToObject(string xml)
{
   return TimeSpan.Parse(xml);
}

public IComparer Comparator
{
   get
   {
      return Comparer<TimeSpan>.Default;
   }
}

#endregion
public override object FromStringValue(string xml)
{
   return TimeSpan.Parse(xml);
}

public override System.Type PrimitiveClass
{
   get
   {
      return typeof(TimeSpan);
   }
}

public override object DefaultValue
{
   get
   {
      return TimeSpan.Zero;
   }
}

public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
{
   return '\'' + ((TimeSpan)value).Ticks.ToString() + '\'';
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None