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

Current() public static method

Create a StorageDescriptor for an item which is the Current item in an iterator.
public static Current ( LocalBuilder locIter, Type itemStorageType ) : StorageDescriptor
locIter System.Reflection.Emit.LocalBuilder
itemStorageType System.Type
return StorageDescriptor
        public static StorageDescriptor Current(LocalBuilder locIter, Type itemStorageType) {
            Debug.Assert(locIter.LocalType.GetMethod("get_Current").ReturnType == itemStorageType,
                         "Type " + itemStorageType + " does not match type of Current property.");

            StorageDescriptor storage = new StorageDescriptor();
            storage.location = ItemLocation.Current;
            storage.locationObject = locIter;
            storage.itemStorageType = itemStorageType;
            return storage;
        }