public MyEntity(bool initialize)
 {
     if (initialize)
     {
         _asICollection = new HashSet <MyOtherEntity>();
         _asICollectionOfEntitiesWithCustomComparer = new HashSet <MyEntityWithCustomComparer>();
         _asIList                 = new List <MyOtherEntity>();
         _asList                  = new List <MyOtherEntity>();
         _myCollection            = new MyCollection();
         _withNoBackingFieldFound = new HashSet <MyOtherEntity>();
         _withNoSetter            = new HashSet <MyOtherEntity>();
         _withNoGetter            = new HashSet <MyOtherEntity>();
         _enumerable              = new HashSet <MyOtherEntity>();
         _enumerableNotCollection = new MyEnumerable();
         _array                        = Array.Empty <MyOtherEntity>();
         _privateCollection            = MyPrivateCollection.Create();
         _internalCollection           = new MyInternalCollection();
         _unavailableCollection        = new MyUnavailableCollection(true);
         AutoProp                      = new HashSet <MyOtherEntity>();
         ReadOnlyAutoProp              = new HashSet <MyOtherEntity>();
         _readOnlyProp                 = new HashSet <MyOtherEntity>();
         _readOnlyFieldProp            = new HashSet <MyOtherEntity>();
         _writeOnlyProp                = new HashSet <MyOtherEntity>();
         _fullPropNoFieldNotFound      = new HashSet <MyOtherEntity>();
         _readOnlyPropNoFieldNotFound  = new HashSet <MyOtherEntity>();
         _writeOnlyPropNoFieldNotFound = new HashSet <MyOtherEntity>();
     }
 }
Esempio n. 2
0
 public void InitializeCollections()
 {
     _asICollection         = new HashSet <MyOtherEntity>();
     _asIList               = new List <MyOtherEntity>();
     _asList                = new List <MyOtherEntity>();
     _myCollection          = new MyCollection();
     _withNoSetter          = new HashSet <MyOtherEntity>();
     _withNoGetter          = new HashSet <MyOtherEntity>();
     _enumerable            = new HashSet <MyOtherEntity>();
     _array                 = new MyOtherEntity[0];
     _privateCollection     = MyPrivateCollection.Create();
     _internalCollection    = new MyInternalCollection();
     _unavailableCollection = new MyUnavailableCollection(true);
 }