Composite.Data.DynamicTypes.DataTypeDescriptor.AddSuperInterface C# (CSharp) Метод

AddSuperInterface() публичный Метод

Adds an interface the data type should inherit from
public AddSuperInterface ( Type interfaceType ) : void
interfaceType System.Type
Результат void
        public void AddSuperInterface(Type interfaceType)
        {
            AddSuperInterface(interfaceType, true);
        }

Same methods

DataTypeDescriptor::AddSuperInterface ( Type interfaceType, bool addInheritedFields ) : void

Usage Example

Пример #1
0
        /// <summary>
        /// Clones the data type description.
        /// </summary>
        /// <returns>A clone</returns>
        public DataTypeDescriptor Clone()
        {
            var dataTypeDescriptor = new DataTypeDescriptor(this.DataTypeId, this.Namespace, this.Name, this.TypeManagerTypeName, this.IsCodeGenerated)
            {
                Title = this.Title,
                BuildNewHandlerTypeName = this.BuildNewHandlerTypeName,
                LabelFieldName          = this.LabelFieldName,
                InternalUrlPrefix       = this.InternalUrlPrefix,
                Searchable = this.Searchable
            };

            foreach (DataTypeAssociationDescriptor dataTypeAssociationDescriptor in this.DataAssociations)
            {
                dataTypeDescriptor.DataAssociations.Add(dataTypeAssociationDescriptor.Clone());
            }

            dataTypeDescriptor.DataScopes = new List <DataScopeIdentifier>(this.DataScopes);

            foreach (DataFieldDescriptor dataFieldDescriptor in this.Fields)
            {
                if (!dataFieldDescriptor.Inherited)
                {
                    dataTypeDescriptor.Fields.Add(dataFieldDescriptor.Clone());
                }
            }


            foreach (string keyPropertyName in this.KeyPropertyNames)
            {
                dataTypeDescriptor.KeyPropertyNames.Add(keyPropertyName, false);
            }

            foreach (string storeSortOrderFieldNames in this.StoreSortOrderFieldNames)
            {
                dataTypeDescriptor.StoreSortOrderFieldNames.Add(storeSortOrderFieldNames, false);
            }

            foreach (Type superInterface in this.SuperInterfaces)
            {
                dataTypeDescriptor.AddSuperInterface(superInterface);
            }

            return(dataTypeDescriptor);
        }
All Usage Examples Of Composite.Data.DynamicTypes.DataTypeDescriptor::AddSuperInterface