public EnumTypeViewModel(EnumType enumType) { Initialize(); Debug.Assert(enumType != null, "Parameter enum type is null"); if (enumType != null) { _enumType = enumType; _artifact = enumType.Artifact as EntityDesignArtifact; _isFlag = enumType.IsFlags.Value; _name = enumType.Name.Value; _underlyingType = enumType.UnderlyingType.Value; _externalTypeName = enumType.ExternalTypeName.Value; _isReferenceExternalType = (String.IsNullOrWhiteSpace(_externalTypeName) == false); foreach (var member in enumType.Members()) { var vm = new EnumTypeMemberViewModel(this, member); vm.PropertyChanged += enumTypeMember_PropertyChanged; Members.Add(vm); } } _isValid = true; }
public EnumTypeViewModel(EnumType enumType) { Initialize(); Debug.Assert(enumType != null, "Parameter enum type is null"); if (enumType != null) { _enumType = enumType; _artifact = enumType.Artifact as EntityDesignArtifact; _isFlag = enumType.IsFlags.Value; _name = enumType.Name.Value; _underlyingType = enumType.UnderlyingType.Value; _externalTypeName = enumType.ExternalTypeName.Value; _isReferenceExternalType = (String.IsNullOrWhiteSpace(_externalTypeName) == false); foreach (var member in enumType.Members()) { var vm = new EnumTypeMemberViewModel(this, member); vm.PropertyChanged += enumTypeMember_PropertyChanged; Members.Add(vm); } } _isValid = true; }