示例#1
0
        private static bool TryGetMetaObject(ref MetaObject instance)
        {
            // If we're already a COM MO don't make a new one
            // (we do this to prevent recursion if we call Fallback from COM)
            if (instance is ComUnwrappedMetaObject)
            {
                return(false);
            }

            if (IsComObject(instance.Value))
            {
                instance = new ComMetaObject(instance.Expression, instance.Restrictions, instance.Value);
                return(true);
            }

            return(false);
        }
示例#2
0
        private static bool TryGetMetaObject(ref MetaObject instance) {
            // If we're already a COM MO don't make a new one
            // (we do this to prevent recursion if we call Fallback from COM)
            if (instance is ComUnwrappedMetaObject) {
                return false;
            }

            if (IsComObject(instance.Value)) {
                instance = new ComMetaObject(instance.Expression, instance.Restrictions, instance.Value);
                return true;
            }

            return false;
        }