Пример #1
0
        // load the extension class for System.Core
        internal static SystemCoreExtensionMethods ExtensionsForSystemCore(bool force = false)
        {
            if (_systemCoreExtensionMethods == null &&
                (force || IsLoaded(UncommonAssembly.System_Core)))
            {
                _systemCoreExtensionMethods = (SystemCoreExtensionMethods)LoadExtensionFor("SystemCore");
            }

            return(_systemCoreExtensionMethods);
        }
        // Token: 0x06006533 RID: 25907 RVA: 0x001C67E0 File Offset: 0x001C49E0
        internal static object GetIndexerAccessor(int rank)
        {
            SystemCoreExtensionMethods systemCoreExtensionMethods = AssemblyHelper.ExtensionsForSystemCore(false);

            if (systemCoreExtensionMethods == null)
            {
                return(null);
            }
            return(systemCoreExtensionMethods.GetIndexerAccessor(rank));
        }
        // Token: 0x06006532 RID: 25906 RVA: 0x001C67BC File Offset: 0x001C49BC
        internal static object NewDynamicPropertyAccessor(Type ownerType, string propertyName)
        {
            SystemCoreExtensionMethods systemCoreExtensionMethods = AssemblyHelper.ExtensionsForSystemCore(false);

            if (systemCoreExtensionMethods == null)
            {
                return(null);
            }
            return(systemCoreExtensionMethods.NewDynamicPropertyAccessor(ownerType, propertyName));
        }
Пример #4
0
        // load the extension class for System.Core
        internal static SystemCoreExtensionMethods ExtensionsForSystemCore(bool force = false)
        {
            // System.Core is always loaded by default on .NET Framework. On .NET Core,
            // System.Core is a facade assembly never loaded by the CLR, and System.Core types
            // have been forwarded to System.Runtime (always loaded by default) and
            // System.Linq.Expressions.  Only load the extension assembly if System.Linq.Expressions
            // has already been loaded (e.g., a System.Dynamic type has been created).
            if (_systemCoreExtensionMethods == null &&
                (force || IsLoaded(UncommonAssembly.System_Linq_Expressions)))
            {
                _systemCoreExtensionMethods = (SystemCoreExtensionMethods)LoadExtensionFor("SystemCore");
            }

            return(_systemCoreExtensionMethods);
        }
        // return a DynamicIndexerAccessor with the given number of arguments
        internal static object GetIndexerAccessor(int rank)
        {
            SystemCoreExtensionMethods extensions = AssemblyHelper.ExtensionsForSystemCore();

            return((extensions != null) ? extensions.GetIndexerAccessor(rank) : null);
        }
        // return a new DynamicPropertyAccessor
        internal static object NewDynamicPropertyAccessor(Type ownerType, string propertyName)
        {
            SystemCoreExtensionMethods extensions = AssemblyHelper.ExtensionsForSystemCore();

            return((extensions != null) ? extensions.NewDynamicPropertyAccessor(ownerType, propertyName) : null);
        }
        // return true if the item implements IDynamicMetaObjectProvider
        internal static bool IsIDynamicMetaObjectProvider(object item)
        {
            SystemCoreExtensionMethods extensions = AssemblyHelper.ExtensionsForSystemCore();

            return((extensions != null) ? extensions.IsIDynamicMetaObjectProvider(item) : false);
        }
        // load the extension class for System.Core
        internal static SystemCoreExtensionMethods ExtensionsForSystemCore(bool force=false)
        {
            if (_systemCoreExtensionMethods == null &&
                (force || IsLoaded(UncommonAssembly.System_Core)))
            {
                _systemCoreExtensionMethods = (SystemCoreExtensionMethods)LoadExtensionFor("SystemCore");
            }

            return _systemCoreExtensionMethods;
        }
        // Token: 0x06006531 RID: 25905 RVA: 0x001C679C File Offset: 0x001C499C
        internal static bool IsIDynamicMetaObjectProvider(object item)
        {
            SystemCoreExtensionMethods systemCoreExtensionMethods = AssemblyHelper.ExtensionsForSystemCore(false);

            return(systemCoreExtensionMethods != null && systemCoreExtensionMethods.IsIDynamicMetaObjectProvider(item));
        }