protected ModelHashingPrivateSetNoneParent(
            bool parentBoolProperty,
            int parentIntProperty,
            string parentStringProperty,
            Guid parentGuidProperty,
            DateTime parentDateTimeProperty,
            CustomEnum parentCustomEnumProperty,
            CustomFlagsEnum parentCustomFlagsEnumProperty,
            CustomClass parentCustomClassProperty,
            CustomBaseClass parentCustomBaseClassProperty,
            CustomGenericClass <CustomClass> parentCustomGenericClassOfCustomClassProperty)
        {
            new { parentStringProperty }.AsArg().Must().NotBeNullNorWhiteSpace();
            new { parentCustomClassProperty }.AsArg().Must().NotBeNull();
            new { parentCustomBaseClassProperty }.AsArg().Must().NotBeNull();
            new { parentCustomGenericClassOfCustomClassProperty }.AsArg().Must().NotBeNull();

            this.ParentBoolProperty            = parentBoolProperty;
            this.ParentIntProperty             = parentIntProperty;
            this.ParentStringProperty          = parentStringProperty;
            this.ParentGuidProperty            = parentGuidProperty;
            this.ParentDateTimeProperty        = parentDateTimeProperty;
            this.ParentCustomEnumProperty      = parentCustomEnumProperty;
            this.ParentCustomFlagsEnumProperty = parentCustomFlagsEnumProperty;
            this.ParentCustomClassProperty     = parentCustomClassProperty;
            this.ParentCustomBaseClassProperty = parentCustomBaseClassProperty;
            this.ParentCustomGenericClassOfCustomClassProperty = parentCustomGenericClassOfCustomClassProperty;
        }
        public ModelAllPrivateSetNone(
            bool boolProperty,
            int intProperty,
            string stringProperty,
            Guid guidProperty,
            DateTime dateTimeProperty,
            CustomEnum customEnumProperty,
            CustomFlagsEnum customFlagsEnumProperty,
            CustomClass customClassProperty,
            CustomBaseClass customBaseClassProperty,
            CustomGenericClass <CustomClass> customGenericClassOfCustomClassProperty)
        {
            new { stringProperty }.AsArg().Must().NotBeNullNorWhiteSpace();
            new { customClassProperty }.AsArg().Must().NotBeNull();
            new { customBaseClassProperty }.AsArg().Must().NotBeNull();
            new { customGenericClassOfCustomClassProperty }.AsArg().Must().NotBeNull();

            this.BoolProperty            = boolProperty;
            this.IntProperty             = intProperty;
            this.StringProperty          = stringProperty;
            this.GuidProperty            = guidProperty;
            this.DateTimeProperty        = dateTimeProperty;
            this.CustomEnumProperty      = customEnumProperty;
            this.CustomFlagsEnumProperty = customFlagsEnumProperty;
            this.CustomClassProperty     = customClassProperty;
            this.CustomBaseClassProperty = customBaseClassProperty;
            this.CustomGenericClassOfCustomClassProperty = customGenericClassOfCustomClassProperty;
        }
        protected ModelPrivateSetNonGenericParent(
            string parentStringProperty,
            int parentIntProperty,
            CustomEnum parentEnumProperty,
            CustomClass parentCustomClassProperty,
            string[] parentArrayProperty,
            decimal?parentNullableProperty,
            CustomGenericClass <string> parentCustomGenericClassProperty,
            IReadOnlyCollection <string> parentReadOnlyCollectionProperty,
            IReadOnlyDictionary <string, string> parentReadOnlyDictionaryProperty)
        {
            new { parentStringProperty }.AsArg().Must().NotBeNullNorWhiteSpace();
            new { parentCustomClassProperty }.AsArg().Must().NotBeNull();
            new { parentArrayProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { parentCustomGenericClassProperty }.AsArg().Must().NotBeNull();
            new { parentReadOnlyCollectionProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { parentReadOnlyDictionaryProperty }.AsArg().Must().NotBeNullNorEmptyDictionaryNorContainAnyNullValues();

            this.ParentStringProperty             = parentStringProperty;
            this.ParentIntProperty                = parentIntProperty;
            this.ParentEnumProperty               = parentEnumProperty;
            this.ParentCustomClassProperty        = parentCustomClassProperty;
            this.ParentArrayProperty              = parentArrayProperty;
            this.ParentNullableProperty           = parentNullableProperty;
            this.ParentCustomGenericClassProperty = parentCustomGenericClassProperty;
            this.ParentReadOnlyCollectionProperty = parentReadOnlyCollectionProperty;
            this.ParentReadOnlyDictionaryProperty = parentReadOnlyDictionaryProperty;
        }
Exemplo n.º 4
0
        public ModelPrivateSetGenericParentGenericChild(
            string parentStringProperty,
            int parentIntProperty,
            CustomEnum parentEnumProperty,
            CustomClass parentCustomClassProperty,
            TFirst parentGenericArgumentProperty,
            TFirst[] parentGenericArrayProperty,
            TSecond?parentGenericNullableProperty,
            CustomGenericClass <TSecond> parentGenericCustomGenericClassProperty,
            IReadOnlyCollection <TFirst> parentGenericReadOnlyCollectionProperty,
            IReadOnlyList <TFirst> parentGenericReadOnlyListProperty,
            IReadOnlyDictionary <TFirst, TSecond> parentGenericReadOnlyDictionaryProperty1,
            IReadOnlyDictionary <TSecond, TFirst> parentGenericReadOnlyDictionaryProperty2,
            IReadOnlyDictionary <string, TSecond> parentGenericPartiallyClosedReadOnlyDictionaryProperty1,
            IReadOnlyDictionary <TFirst, string> parentGenericPartiallyClosedReadOnlyDictionaryProperty2,
            string childStringProperty,
            int childIntProperty,
            CustomEnum childEnumProperty,
            CustomClass childCustomClassProperty,
            TFirst childGenericArgumentProperty,
            TFirst[] childGenericArrayProperty,
            TSecond?childGenericNullableProperty,
            CustomGenericClass <TSecond> childGenericCustomGenericClassProperty,
            IReadOnlyCollection <TFirst> childGenericReadOnlyCollectionProperty,
            IReadOnlyList <TFirst> childGenericReadOnlyListProperty,
            IReadOnlyDictionary <TFirst, TSecond> childGenericReadOnlyDictionaryProperty1,
            IReadOnlyDictionary <TSecond, TFirst> childGenericReadOnlyDictionaryProperty2,
            IReadOnlyDictionary <string, TSecond> childGenericPartiallyClosedReadOnlyDictionaryProperty1,
            IReadOnlyDictionary <TFirst, string> childGenericPartiallyClosedReadOnlyDictionaryProperty2)
            : base(parentStringProperty, parentIntProperty, parentEnumProperty, parentCustomClassProperty, parentGenericArgumentProperty, parentGenericArrayProperty, parentGenericNullableProperty, parentGenericCustomGenericClassProperty, parentGenericReadOnlyCollectionProperty, parentGenericReadOnlyListProperty, parentGenericReadOnlyDictionaryProperty1, parentGenericReadOnlyDictionaryProperty2, parentGenericPartiallyClosedReadOnlyDictionaryProperty1, parentGenericPartiallyClosedReadOnlyDictionaryProperty2)
        {
            new { childStringProperty }.AsArg().Must().NotBeNullNorWhiteSpace();
            new { childCustomClassProperty }.AsArg().Must().NotBeNull();
            new { childGenericArgumentProperty }.AsArg().Must().NotBeNull();
            new { childGenericArrayProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { childGenericCustomGenericClassProperty }.AsArg().Must().NotBeNull();
            new { childGenericReadOnlyCollectionProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { childGenericReadOnlyListProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { childGenericReadOnlyDictionaryProperty1 }.AsArg().Must().NotBeNullNorEmptyDictionary();
            new { childGenericReadOnlyDictionaryProperty2 }.AsArg().Must().NotBeNullNorEmptyDictionaryNorContainAnyNullValues();
            new { childGenericPartiallyClosedReadOnlyDictionaryProperty1 }.AsArg().Must().NotBeNullNorEmptyDictionary();
            new { childGenericPartiallyClosedReadOnlyDictionaryProperty2 }.AsArg().Must().NotBeNullNorEmptyDictionaryNorContainAnyNullValues();

            this.ChildStringProperty                     = childStringProperty;
            this.ChildIntProperty                        = childIntProperty;
            this.ChildEnumProperty                       = childEnumProperty;
            this.ChildCustomClassProperty                = childCustomClassProperty;
            this.ChildGenericArgumentProperty            = childGenericArgumentProperty;
            this.ChildGenericArrayProperty               = childGenericArrayProperty;
            this.ChildGenericNullableProperty            = childGenericNullableProperty;
            this.ChildGenericCustomGenericClassProperty  = childGenericCustomGenericClassProperty;
            this.ChildGenericReadOnlyCollectionProperty  = childGenericReadOnlyCollectionProperty;
            this.ChildGenericReadOnlyListProperty        = childGenericReadOnlyListProperty;
            this.ChildGenericReadOnlyDictionaryProperty1 = childGenericReadOnlyDictionaryProperty1;
            this.ChildGenericReadOnlyDictionaryProperty2 = childGenericReadOnlyDictionaryProperty2;
            this.ChildGenericPartiallyClosedReadOnlyDictionaryProperty1 = childGenericPartiallyClosedReadOnlyDictionaryProperty1;
            this.ChildGenericPartiallyClosedReadOnlyDictionaryProperty2 = childGenericPartiallyClosedReadOnlyDictionaryProperty2;
        }
        public int CompareTo(
            CustomGenericClass <T> other)
        {
            if (ReferenceEquals(other, null))
            {
                return(1);
            }

            var thisString  = this.Item1 + this.Item2;
            var otherString = other.Item1 + other.Item2;

            var result = string.Compare(thisString, otherString, StringComparison.Ordinal);

            return(result);
        }
        public static int Compare(
            CustomGenericClass <T> left,
            CustomGenericClass <T> right)
        {
            if (ReferenceEquals(left, right))
            {
                return(0);
            }

            if (ReferenceEquals(left, null))
            {
                return(-1);
            }

            var result = left.CompareTo(right);

            return(result);
        }
        public ModelPrivateSetGeneric(
            string stringProperty,
            int intProperty,
            CustomEnum enumProperty,
            CustomClass customClassProperty,
            TFirst genericArgumentProperty,
            TFirst[] genericArrayProperty,
            TSecond?genericNullableProperty,
            CustomGenericClass <TSecond> genericCustomGenericClassProperty,
            IReadOnlyCollection <TFirst> genericReadOnlyCollectionProperty,
            IReadOnlyList <TFirst> genericReadOnlyListProperty,
            IReadOnlyDictionary <TFirst, TSecond> genericReadOnlyDictionaryProperty1,
            IReadOnlyDictionary <TSecond, TFirst> genericReadOnlyDictionaryProperty2,
            IReadOnlyDictionary <string, TSecond> genericPartiallyClosedReadOnlyDictionaryProperty1,
            IReadOnlyDictionary <TFirst, string> genericPartiallyClosedReadOnlyDictionaryProperty2)
        {
            new { stringProperty }.AsArg().Must().NotBeNullNorWhiteSpace();
            new { customClassProperty }.AsArg().Must().NotBeNull();
            new { genericArgumentProperty }.AsArg().Must().NotBeNull();
            new { genericArrayProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { genericCustomGenericClassProperty }.AsArg().Must().NotBeNull();
            new { genericReadOnlyCollectionProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { genericReadOnlyListProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { genericReadOnlyDictionaryProperty1 }.AsArg().Must().NotBeNullNorEmptyDictionary();
            new { genericReadOnlyDictionaryProperty2 }.AsArg().Must().NotBeNullNorEmptyDictionaryNorContainAnyNullValues();
            new { genericPartiallyClosedReadOnlyDictionaryProperty1 }.AsArg().Must().NotBeNullNorEmptyDictionary();
            new { genericPartiallyClosedReadOnlyDictionaryProperty2 }.AsArg().Must().NotBeNullNorEmptyDictionaryNorContainAnyNullValues();

            this.StringProperty                     = stringProperty;
            this.IntProperty                        = intProperty;
            this.EnumProperty                       = enumProperty;
            this.CustomClassProperty                = customClassProperty;
            this.GenericArgumentProperty            = genericArgumentProperty;
            this.GenericArrayProperty               = genericArrayProperty;
            this.GenericNullableProperty            = genericNullableProperty;
            this.GenericCustomGenericClassProperty  = genericCustomGenericClassProperty;
            this.GenericReadOnlyCollectionProperty  = genericReadOnlyCollectionProperty;
            this.GenericReadOnlyListProperty        = genericReadOnlyListProperty;
            this.GenericReadOnlyDictionaryProperty1 = genericReadOnlyDictionaryProperty1;
            this.GenericReadOnlyDictionaryProperty2 = genericReadOnlyDictionaryProperty2;
            this.GenericPartiallyClosedReadOnlyDictionaryProperty1 = genericPartiallyClosedReadOnlyDictionaryProperty1;
            this.GenericPartiallyClosedReadOnlyDictionaryProperty2 = genericPartiallyClosedReadOnlyDictionaryProperty2;
        }
        public ModelPrivateSetGenericParentNonGenericChild(
            string parentStringProperty,
            int parentIntProperty,
            CustomEnum parentEnumProperty,
            CustomClass parentCustomClassProperty,
            CustomClass parentGenericArgumentProperty,
            CustomClass[] parentGenericArrayProperty,
            Guid?parentGenericNullableProperty,
            CustomGenericClass <Guid> parentGenericCustomGenericClassProperty,
            IReadOnlyCollection <CustomClass> parentGenericReadOnlyCollectionProperty,
            IReadOnlyList <CustomClass> parentGenericReadOnlyListProperty,
            IReadOnlyDictionary <CustomClass, Guid> parentGenericReadOnlyDictionaryProperty1,
            IReadOnlyDictionary <Guid, CustomClass> parentGenericReadOnlyDictionaryProperty2,
            IReadOnlyDictionary <string, Guid> parentGenericPartiallyClosedReadOnlyDictionaryProperty1,
            IReadOnlyDictionary <CustomClass, string> parentGenericPartiallyClosedReadOnlyDictionaryProperty2,
            string childStringProperty,
            int childIntProperty,
            CustomEnum childEnumProperty,
            CustomClass childCustomClassProperty,
            string[] childArrayProperty,
            decimal?childNullableProperty,
            CustomGenericClass <string> childCustomGenericClassProperty,
            IReadOnlyCollection <string> childReadOnlyCollectionProperty,
            IReadOnlyDictionary <string, string> childReadOnlyDictionaryProperty)
            : base(parentStringProperty, parentIntProperty, parentEnumProperty, parentCustomClassProperty, parentGenericArgumentProperty, parentGenericArrayProperty, parentGenericNullableProperty, parentGenericCustomGenericClassProperty, parentGenericReadOnlyCollectionProperty, parentGenericReadOnlyListProperty, parentGenericReadOnlyDictionaryProperty1, parentGenericReadOnlyDictionaryProperty2, parentGenericPartiallyClosedReadOnlyDictionaryProperty1, parentGenericPartiallyClosedReadOnlyDictionaryProperty2)
        {
            new { childStringProperty }.AsArg().Must().NotBeNullNorWhiteSpace();
            new { childCustomClassProperty }.AsArg().Must().NotBeNull();
            new { childArrayProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { childCustomGenericClassProperty }.AsArg().Must().NotBeNull();
            new { childReadOnlyCollectionProperty }.AsArg().Must().NotBeNullNorEmptyEnumerableNorContainAnyNulls();
            new { childReadOnlyDictionaryProperty }.AsArg().Must().NotBeNullNorEmptyDictionaryNorContainAnyNullValues();

            this.ChildStringProperty             = childStringProperty;
            this.ChildIntProperty                = childIntProperty;
            this.ChildEnumProperty               = childEnumProperty;
            this.ChildCustomClassProperty        = childCustomClassProperty;
            this.ChildArrayProperty              = childArrayProperty;
            this.ChildNullableProperty           = childNullableProperty;
            this.ChildCustomGenericClassProperty = childCustomGenericClassProperty;
            this.ChildReadOnlyCollectionProperty = childReadOnlyCollectionProperty;
            this.ChildReadOnlyDictionaryProperty = childReadOnlyDictionaryProperty;
        }
Exemplo n.º 9
0
        public ModelStringRepresentationPrivateSetNoneChild2(
            bool parentBoolProperty,
            int parentIntProperty,
            string parentStringProperty,
            Guid parentGuidProperty,
            DateTime parentDateTimeProperty,
            CustomEnum parentCustomEnumProperty,
            CustomFlagsEnum parentCustomFlagsEnumProperty,
            CustomClass parentCustomClassProperty,
            CustomBaseClass parentCustomBaseClassProperty,
            CustomGenericClass <CustomClass> parentCustomGenericClassOfCustomClassProperty,
            bool child2BoolProperty,
            int child2IntProperty,
            string child2StringProperty,
            Guid child2GuidProperty,
            DateTime child2DateTimeProperty,
            CustomEnum child2CustomEnumProperty,
            CustomFlagsEnum child2CustomFlagsEnumProperty,
            CustomClass child2CustomClassProperty,
            CustomBaseClass child2CustomBaseClassProperty,
            CustomGenericClass <CustomClass> child2CustomGenericClassOfCustomClassProperty)
            : base(parentBoolProperty, parentIntProperty, parentStringProperty, parentGuidProperty, parentDateTimeProperty, parentCustomEnumProperty, parentCustomFlagsEnumProperty, parentCustomClassProperty, parentCustomBaseClassProperty, parentCustomGenericClassOfCustomClassProperty)
        {
            new { child2StringProperty }.AsArg().Must().NotBeNullNorWhiteSpace();
            new { child2CustomClassProperty }.AsArg().Must().NotBeNull();
            new { child2CustomBaseClassProperty }.AsArg().Must().NotBeNull();
            new { child2CustomGenericClassOfCustomClassProperty }.AsArg().Must().NotBeNull();

            this.Child2BoolProperty            = child2BoolProperty;
            this.Child2IntProperty             = child2IntProperty;
            this.Child2StringProperty          = child2StringProperty;
            this.Child2GuidProperty            = child2GuidProperty;
            this.Child2DateTimeProperty        = child2DateTimeProperty;
            this.Child2CustomEnumProperty      = child2CustomEnumProperty;
            this.Child2CustomFlagsEnumProperty = child2CustomFlagsEnumProperty;
            this.Child2CustomClassProperty     = child2CustomClassProperty;
            this.Child2CustomBaseClassProperty = child2CustomBaseClassProperty;
            this.Child2CustomGenericClassOfCustomClassProperty = child2CustomGenericClassOfCustomClassProperty;
        }
Exemplo n.º 10
0
        public ModelAllPublicSetNone DeepCloneWithCustomGenericClassOfCustomClassProperty(CustomGenericClass <CustomClass> customGenericClassOfCustomClassProperty)
        {
            var result = new ModelAllPublicSetNone
            {
                BoolProperty            = this.BoolProperty.DeepClone(),
                IntProperty             = this.IntProperty.DeepClone(),
                StringProperty          = this.StringProperty?.DeepClone(),
                GuidProperty            = this.GuidProperty.DeepClone(),
                DateTimeProperty        = this.DateTimeProperty.DeepClone(),
                CustomEnumProperty      = this.CustomEnumProperty.DeepClone(),
                CustomFlagsEnumProperty = this.CustomFlagsEnumProperty.DeepClone(),
                CustomClassProperty     = this.CustomClassProperty?.DeepClone(),
                CustomBaseClassProperty = this.CustomBaseClassProperty?.DeepClone(),
                CustomGenericClassOfCustomClassProperty = customGenericClassOfCustomClassProperty,
            };

            return(result);
        }
Exemplo n.º 11
0
 public virtual ModelCloningPublicSetNoneParent DeepCloneWithParentCustomGenericClassOfCustomClassProperty(CustomGenericClass <CustomClass> parentCustomGenericClassOfCustomClassProperty)
 {
     throw new NotImplementedException("This method should be abstract.  It was generated as virtual so that you aren't forced to override it when you create a new model that derives from this model.  It will be overridden in the generated designer file.");
 }
 public virtual ModelPrivateSetGenericParent <TFirst, TSecond> DeepCloneWithParentGenericCustomGenericClassProperty(CustomGenericClass <TSecond> parentGenericCustomGenericClassProperty)
 {
     throw new NotImplementedException("This method should be abstract.  It was generated as virtual so that you aren't forced to override it when you create a new model that derives from this model.  It will be overridden in the generated designer file.");
 }
 /// <inheritdoc />
 public bool Equals(CustomGenericClass <T> other) => this == other;