CloneSet517


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
43230.981namespace_member_declarations
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1434
src/NHibernate/Type/SortedMapType.cs
2425
src/NHibernate/Type/SortedSetType.cs
Clone Instance
1
Line Count
43
Source Line
4
Source File
src/NHibernate/Type/SortedMapType.cs

namespace NHibernate.Type
{
        /// <summary>
        /// Extends the <see cref="MapType" /> to provide sorting.
        /// </summary>
        [Serializable]
        public class SortedMapType : MapType
        {
                private readonly IComparer comparer;

                /// <summary>
                /// Initializes a new instance of a <see cref="SortedMapType"/> class for
                /// a specific role using the <see cref="IComparer"/> to do the sorting.
                /// </summary>
                /// <param name="role">The role the persistent collection is in.</param>
                /// <param name="propertyRef">The name of the property in the
                /// owner object containing the collection ID, or <see langword="null" /> if it is
                /// the primary key.</param>
                /// <param name="comparer">The <see cref="IComparer"/> to use for the sorting.</param>
                /// <param name="isEmbeddedInXML"></param>
                public SortedMapType(string role, string propertyRef, IComparer comparer, bool isEmbeddedInXML)
                        : base(role, propertyRef, isEmbeddedInXML)
                {
                        this.comparer = comparer;
                }


                public IComparer Comparer
                {
                        get { return comparer;
                            }
                }

                public override object Instantiate(int anticipatedSize)
                {
                        return new SortedList(comparer);
                }

                public override System.Type ReturnedClass
                {
                        get { return typeof( SortedList);
                            }
                }

        }
}


Clone Instance
2
Line Count
42
Source Line
5
Source File
src/NHibernate/Type/SortedSetType.cs

namespace NHibernate.Type
{
        /// <summary>
        /// Extends the <see cref="SetType" /> to provide sorting.
        /// </summary>
        [Serializable]
        public class SortedSetType : SetType
        {
                private readonly IComparer comparer;

                /// <summary>
                /// Initializes a new instance of a <see cref="SortedSetType"/> class for
                /// a specific role using the <see cref="IComparer"/> to do the sorting.
                /// </summary>
                /// <param name="role">The role the persistent collection is in.</param>
                /// <param name="propertyRef">The name of the property in the
                /// owner object containing the collection ID, or <see langword="null" /> if it is
                /// the primary key.</param>
                /// <param name="comparer">The <see cref="IComparer"/> to use for the sorting.</param>
                /// <param name="isEmbeddedInXML"></param>
                public SortedSetType(string role, string propertyRef, IComparer comparer, bool isEmbeddedInXML)
                        : base(role, propertyRef, isEmbeddedInXML)
                {
                        this.comparer = comparer;
                }

                public IComparer Comparer
                {
                        get { return comparer;
                            }
                }

                public override object Instantiate(int anticipatedSize)
                {
                        return new SortedSet(comparer);
                }

                public override System.Type ReturnedClass
                {
                        get { return typeof( SortedSet);
                            }
                }

        }
}


Clone AbstractionParameter Count: 3Parameter Bindings

namespace NHibernate.Type
{
   /// <summary>
   /// Extends the <see cref="MapType" /> to provide sorting.
   /// Extends the <see cref="SetType" /> to provide sorting.
   /// </summary>
   [Serializable]
   public class [[#variable5eb0d7a0]]: [[#variable5eb0d720]]
   {
      private readonly IComparer comparer;

      /// <summary>
      /// Initializes a new instance of a <see cref="SortedMapType"/> class for
      /// Initializes a new instance of a <see cref="SortedSetType"/> class for
      /// a specific role using the <see cref="IComparer"/> to do the sorting.
      /// </summary>
      /// <param name="role">The role the persistent collection is in.</param>
      /// <param name="propertyRef">The name of the property in the
      /// owner object containing the collection ID, or <see langword="null" /> if it is
      /// the primary key.</param>
      /// <param name="comparer">The <see cref="IComparer"/> to use for the sorting.</param>
      /// <param name="isEmbeddedInXML"></param>
      public [[#variable5eb0d7a0]](string role, string propertyRef, IComparer comparer, bool isEmbeddedInXML): base(role, propertyRef, isEmbeddedInXML)
      {
         this.comparer = comparer;
      }

      public IComparer Comparer
      {
         get
         {
            return comparer;
         }
      }

      public override object Instantiate(int anticipatedSize)
      {
         return new [[#variable5eb0d680]](comparer);
      }

      public override System.Type ReturnedClass
      {
         get
         {
            return typeof( [[#variable5eb0d680]]);
         }
      }

   }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5eb0d7a0]]
SortedMapType 
12[[#5eb0d7a0]]
SortedSetType 
21[[#5eb0d720]]
MapType 
22[[#5eb0d720]]
SetType 
31[[#5eb0d680]]
SortedList 
32[[#5eb0d680]]
SortedSet