当前位置: 首页>>代码示例>>C#>>正文


C# IExtenderProvider类代码示例

本文整理汇总了C#中IExtenderProvider的典型用法代码示例。如果您正苦于以下问题:C# IExtenderProvider类的具体用法?C# IExtenderProvider怎么用?C# IExtenderProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IExtenderProvider类属于命名空间,在下文中一共展示了IExtenderProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterExtenderProvider

 public int RegisterExtenderProvider(IExtenderProvider extenderProvider)
 {
     int cookie = this.lastCookie + 1;
     this.extenderProviders.Add(cookie, extenderProvider);
     this.lastCookie = cookie;
     return cookie;
 }
开发者ID:icool123,项目名称:T4Toolbox,代码行数:7,代码来源:FakeObjectExtenders.cs

示例2: RemoveExtenderProvider

		public void RemoveExtenderProvider (IExtenderProvider provider)
		{
			if (_extenderProviders != null) {
				if (_extenderProviders.Contains (provider))
					_extenderProviders.Remove (provider);
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:ExtenderService.cs

示例3: Create

 /// <devdoc>
 ///     Creates a new ExtenderProvidedPropertyAttribute.
 /// </devdoc>
 internal static ExtenderProvidedPropertyAttribute Create(PropertyDescriptor extenderProperty, Type receiverType, IExtenderProvider provider) {
     ExtenderProvidedPropertyAttribute e = new ExtenderProvidedPropertyAttribute();
     e.extenderProperty = extenderProperty;
     e.receiverType = receiverType;
     e.provider = provider;
     return e;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:10,代码来源:ExtenderProvidedPropertyAttribute.cs

示例4: AddExtenderProvider

		public void AddExtenderProvider (IExtenderProvider provider)
		{
			if (_extenderProviders != null) {
				if (!_extenderProviders.Contains (provider))
					_extenderProviders.Add (provider);
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:ExtenderService.cs

示例5:

	internal ExtenderProvidedPropertyAttribute
				(PropertyDescriptor extenderProperty,
				 IExtenderProvider provider, Type receiverType)
			{
				this.extenderProperty = extenderProperty;
				this.provider = provider;
				this.receiverType = receiverType;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:ExtenderProvidedPropertyAttribute.cs

示例6: CreateAttribute

		// Call this method to create a ExtenderProvidedPropertyAttribute and set it's values
		internal static ExtenderProvidedPropertyAttribute CreateAttribute (PropertyDescriptor extenderProperty, IExtenderProvider provider, Type receiverType)
		{
			ExtenderProvidedPropertyAttribute NewAttribute = new ExtenderProvidedPropertyAttribute();
			NewAttribute.extender = extenderProperty;
			NewAttribute.receiver = receiverType;
			NewAttribute.extenderProvider = provider;
			return NewAttribute; 
		}
开发者ID:nlhepler,项目名称:mono,代码行数:9,代码来源:ExtenderProvidedPropertyAttribute.cs

示例7:

 IExtenderProvider[] IExtenderListService.GetExtenderProviders()
 {
     if (this._providers != null)
     {
         IExtenderProvider[] array = new IExtenderProvider[this._providers.Count];
         this._providers.CopyTo(array, 0);
         return array;
     }
     return new IExtenderProvider[0];
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:ExtenderProviderService.cs

示例8: GetExtenderProviders

		public IExtenderProvider[] GetExtenderProviders()
		{
			if (_extenderProviders != null) {
				IExtenderProvider[] result = new IExtenderProvider[_extenderProviders.Count];
				_extenderProviders.CopyTo (result, 0);
				
				return result;
			}
			return null;
		}
开发者ID:Profit0004,项目名称:mono,代码行数:10,代码来源:ExtenderService.cs

示例9: ArgumentNullException

 void IExtenderProviderService.RemoveExtenderProvider(IExtenderProvider provider)
 {
     if (provider == null)
     {
         throw new ArgumentNullException("provider");
     }
     if (this._providers != null)
     {
         this._providers.Remove(provider);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:ExtenderProviderService.cs

示例10: DebugExtendedPropertyDescriptor

        /// <devdoc>
        ///     Creates a new extended property info.  Callers can then treat this as
        ///     a standard property.
        /// </devdoc>
        public DebugExtendedPropertyDescriptor(DebugReflectPropertyDescriptor extenderInfo, Type receiverType, IExtenderProvider provider, Attribute[] attributes)
            : base(extenderInfo, attributes) {

            Debug.Assert(extenderInfo != null, "DebugExtendedPropertyDescriptor must have extenderInfo");
            Debug.Assert(provider != null, "DebugExtendedPropertyDescriptor must have provider");

            ArrayList attrList = new ArrayList(AttributeArray);
            attrList.Add(ExtenderProvidedPropertyAttribute.Create(extenderInfo, receiverType, provider));
            if (extenderInfo.IsReadOnly) {
                attrList.Add(ReadOnlyAttribute.Yes);
            }
            
            Attribute[] temp = new Attribute[attrList.Count];
            attrList.CopyTo(temp, 0);
            AttributeArray = temp;

            this.extenderInfo = extenderInfo;
            this.provider = provider;
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:23,代码来源:DebugExtendedPropertyDescriptor.cs

示例11: ExtenderShouldSerializeValue

        internal bool ExtenderShouldSerializeValue(IExtenderProvider provider, object component) {
        

            provider = (IExtenderProvider)GetDebugInvokee(componentClass, provider);

            if (IsReadOnly) {
                if (ShouldSerializeMethodValue != null) {
                    try {
                        return (bool)ShouldSerializeMethodValue.Invoke(provider, new object[] {component});
                    }
                    catch {}
                }
                return Attributes.Contains(DesignerSerializationVisibilityAttribute.Content);
            }
            else if (DefaultValue == noValue) {
                if (ShouldSerializeMethodValue != null) {
                    try {
                        return (bool)ShouldSerializeMethodValue.Invoke(provider, new object[] {component});
                    }
                    catch {}
                }
                return true;
            }
            return !object.Equals(DefaultValue, ExtenderGetValue(provider, component));
        }
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:25,代码来源:DebugReflectPropertyDescriptor.cs

示例12: ExtenderSetValue

        internal void ExtenderSetValue(IExtenderProvider provider, object component, object value, PropertyDescriptor notifyDesc) {
            if (provider != null) {

                ISite site = GetSite(component);
                IComponentChangeService changeService = null;
                object oldValue = null;

                // Announce that we are about to change this component
                //
                if (site != null) {
                    changeService = (IComponentChangeService)site.GetService(typeof(IComponentChangeService));
                    Debug.Assert(!CompModSwitches.CommonDesignerServices.Enabled || changeService != null, "IComponentChangeService not found");
                }

                // Make sure that it is ok to send the onchange events
                //
                if (changeService != null) {
                    oldValue = ExtenderGetValue(provider, component);
                    try {
                        changeService.OnComponentChanging(component, notifyDesc);
                    }
                    catch (CheckoutException coEx) {
                        if (coEx == CheckoutException.Canceled) {
                            return;
                        }
                        throw coEx;
                    }
                }

                provider = (IExtenderProvider)GetDebugInvokee(componentClass, provider);

                if (SetMethodValue != null) {
                    SetMethodValue.Invoke(provider, new object[] { component, value});

                    // Now notify the change service that the change was successful.
                    //
                    if (changeService != null) {
                        changeService.OnComponentChanged(component, notifyDesc, oldValue, value);
                    }
                }
            }
        }
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:42,代码来源:DebugReflectPropertyDescriptor.cs

示例13: ExtenderGetValue

 internal object ExtenderGetValue(IExtenderProvider provider, object component) {
     if (provider != null) {
         provider = (IExtenderProvider)GetDebugInvokee(componentClass, provider);
         return GetMethodValue.Invoke(provider, new object[] { component});
     }
     return null;
 }
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:7,代码来源:DebugReflectPropertyDescriptor.cs

示例14: ExtenderGetType

 internal Type ExtenderGetType(IExtenderProvider provider) {
     return PropertyType;
 }
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:3,代码来源:DebugReflectPropertyDescriptor.cs

示例15: ExtenderCanResetValue

 internal bool ExtenderCanResetValue(IExtenderProvider provider, object component) {
     if (DefaultValue != noValue) {
         return !object.Equals(ExtenderGetValue(provider, component),defaultValue);
     }
     
     MethodInfo reset = ResetMethodValue;
     if (reset != null) {
         MethodInfo shouldSerialize = ShouldSerializeMethodValue;
         if (shouldSerialize != null) {
             try {
                 provider = (IExtenderProvider)GetDebugInvokee(componentClass, provider);
                 return (bool)shouldSerialize.Invoke(provider, new object[] { component});
             }
             catch {}
         }
     }
     else {
         return true;
     }
     return false;
 }
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:21,代码来源:DebugReflectPropertyDescriptor.cs


注:本文中的IExtenderProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。