예제 #1
0
        private Com2Properties GetPropsInfo(object component)
        {
            // check caches if necessary
            //
            CheckClear();

            // Get the property info Object
            //
            Com2Properties propsInfo = (Com2Properties)nativeProps[component];

            // if we don't have one, create one and set it up
            //
            if (propsInfo is null || !propsInfo.CheckValid())
            {
                propsInfo = Com2TypeInfoProcessor.GetProperties(component);
                if (propsInfo is not null)
                {
                    propsInfo.Disposed += new EventHandler(OnPropsInfoDisposed);
                    nativeProps.SetWeak(component, propsInfo);
                    propsInfo.AddExtendedBrowsingHandlers(extendedBrowsingHandlers);
                }
            }

            return(propsInfo);
        }
예제 #2
0
        private Com2Properties GetPropsInfo(object component)
        {
            this.CheckClear(component);
            Com2Properties properties = (Com2Properties)this.nativeProps[component];

            if ((properties == null) || !properties.CheckValid())
            {
                properties = Com2TypeInfoProcessor.GetProperties(component);
                if (properties != null)
                {
                    properties.Disposed += new EventHandler(this.OnPropsInfoDisposed);
                    this.nativeProps.SetWeak(component, properties);
                    properties.AddExtendedBrowsingHandlers(this.extendedBrowsingHandlers);
                }
            }
            return(properties);
        }
예제 #3
0
        /// <include file='doc\ComNativeDescriptor.uex' path='docs/doc[@for="ComNativeDescriptor.GetPropsInfo"]/*' />
        /// <devdoc>
        /// Gets the properties manager for an Object.
        /// </devdoc>
        private Com2Properties GetPropsInfo(Object component)
        {
            // check caches if necessary
            //
            CheckClear(component);

            // Get the property info Object
            //
            Com2Properties propsInfo = (Com2Properties)nativeProps[component.GetHashCode()];

            // if we dont' have one, create one and set it up
            //
            if (propsInfo == null || !propsInfo.CheckValid())
            {
                propsInfo = Com2TypeInfoProcessor.GetProperties(component);
                if (propsInfo != null)
                {
                    propsInfo.AddToHashtable(nativeProps);
                    propsInfo.AddExtendedBrowsingHandlers(extendedBrowsingHandlers);
                }
            }
            return(propsInfo);
        }