// PUBLIC METHODS ///////////////////////////////////////////////////
        #region Extensions Methods
        public static void MapClrTypeToDomResource(this IResourceType resourceType, DomReadWriteResource domResource)
        {
            Contract.Requires(resourceType != null);
            Contract.Requires(domResource != null);

            domResource.CreateAndAddNode(() => DomType.CreateFromResourceType(resourceType));
        }
Ejemplo n.º 2
0
        // PUBLIC METHODS ///////////////////////////////////////////////////
        #region Factory Methods
        public static DomType CreateFromResourceType(IResourceType resourceType)
        {
            Contract.Requires(resourceType != null);

            var apiResourceType = resourceType.ResourceIdentityInfo.ApiType;
            var clrResourceType = resourceType.ClrType;

            var domType = new DomType(apiResourceType, clrResourceType);

            return(domType);
        }