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

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

Returns the CLT Type for this data type description.
public GetInterfaceType ( ) : Type
Результат System.Type
        public Type GetInterfaceType()
        {
            if (this.TypeManagerTypeName == null)
            {
                throw new InvalidOperationException("The TypeManagerTypeName has not been set");
            }

            return DataTypeTypesManager.GetDataType(this);
        }

Usage Example

Пример #1
0
        public XmlDataTypeStore(DataTypeDescriptor dataTypeDescriptor, Type dataProviderHelperType, Type dataIdClassType, IEnumerable<XmlDataTypeStoreDataScope> xmlDateTypeStoreDataScopes, bool isGeneratedDataType)
        {
            if (dataProviderHelperType == null) throw new ArgumentNullException("dataProviderHelperType");
            if (dataIdClassType == null) throw new ArgumentNullException("dataIdClassType");

            DataTypeDescriptor =  dataTypeDescriptor;
            DataProviderHelperType = dataProviderHelperType;
            DataIdClassType = dataIdClassType;
            IsGeneratedDataType = isGeneratedDataType;

            _xmlDateTypeStoreDataScopes = xmlDateTypeStoreDataScopes.Evaluate();

            var ordering = new List<Func<XElement, IComparable>>();
            foreach (string key in dataTypeDescriptor.KeyPropertyNames)
            {
                XName localKey = key;
                ordering.Add(f => (string)f.Attribute(localKey) ?? "");
            }
            Func<IEnumerable<XElement>, IOrderedEnumerable<XElement>> orderer = f => ordering.Skip(1).Aggregate(f.OrderBy(ordering.First()), Enumerable.ThenBy);

            foreach (XmlDataTypeStoreDataScope xmlDataTypeStoreDataScope in _xmlDateTypeStoreDataScopes)
            {
                DataScopeIdentifier dataScopeIdentifier = DataScopeIdentifier.Deserialize(xmlDataTypeStoreDataScope.DataScopeName);
                CultureInfo culture = CultureInfo.CreateSpecificCulture(xmlDataTypeStoreDataScope.CultureName);
                Type dataType = dataTypeDescriptor.GetInterfaceType();

                Action cacheFlush = () => DataEventSystemFacade.FireExternalStoreChangedEvent(dataType, dataScopeIdentifier.ToPublicationScope(), culture);
                XmlDataProviderDocumentCache.RegisterExternalFileChangeAction(xmlDataTypeStoreDataScope.Filename, cacheFlush);

                XmlDataProviderDocumentWriter.RegisterFileOrderer(xmlDataTypeStoreDataScope.Filename, orderer);
            }
        }
All Usage Examples Of Composite.Data.DynamicTypes.DataTypeDescriptor::GetInterfaceType