System.Xml.Xsl.IlGen.StorageDescriptor.Global C# (CSharp) Method

Global() public static method

Create a StorageDescriptor for an item located in a global variable.
public static Global ( MethodInfo methGlobal, Type itemStorageType, bool isCached ) : StorageDescriptor
methGlobal System.Reflection.MethodInfo
itemStorageType System.Type
isCached bool
return StorageDescriptor
        public static StorageDescriptor Global(MethodInfo methGlobal, Type itemStorageType, bool isCached) {
            Debug.Assert(methGlobal.ReturnType == itemStorageType ||
                         typeof(IList<>).MakeGenericType(itemStorageType).IsAssignableFrom(methGlobal.ReturnType),
                         "Type " + itemStorageType + " does not match the global method's return type");

            StorageDescriptor storage = new StorageDescriptor();
            storage.location = ItemLocation.Global;
            storage.locationObject = methGlobal;
            storage.itemStorageType = itemStorageType;
            storage.isCached = isCached;
            return storage;
        }