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


C# IComponent.ToString方法代码示例

本文整理汇总了C#中IComponent.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# IComponent.ToString方法的具体用法?C# IComponent.ToString怎么用?C# IComponent.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IComponent的用法示例。


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

示例1: StoreResourceInfo

		static void StoreResourceInfo(IComponent component, string propertyName, ProjectResourceInfo resourceInfo)
		{
			var dictService = component.Site.GetService(typeof(IDictionaryService)) as IDictionaryService;
			if (dictService == null) {
				throw new InvalidOperationException("The required IDictionaryService is not available on component '" + component.ToString() + "'.");
			}
			dictService.SetValue(ProjectResourceService.ProjectResourceKey + propertyName, resourceInfo);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:ProjectResourcesComponentCodeDomSerializer.cs

示例2: unregister

 /// <summary>
 /// Unregister specific component.
 /// </summary>
 /// <param name="c">component</param>
 public void unregister(IComponent c)
 {
     IComponent v;
     if(!components.TryRemove(c.GetType(), out v)) {
         throw new SBEException("Cannot remove component '{0}'", c.ToString());
     }
 }
开发者ID:hilbertdu,项目名称:vsSolutionBuildEvent,代码行数:11,代码来源:Bootloader.cs

示例3: CreateUniqueMethodName

		///     Creates a unique method name.  The name must be
		///     compatible with the script language being used and
		///     it must not conflict with any other name in the user's
		///     code. Since we have no code editor, we can guarantee this
		///     method name will be unique. However, if code were editable,
		///     we would have to check our codeCompileUnit's methods.
		protected string CreateUniqueMethodName(IComponent component, EventDescriptor e)
		{
			string name = component.ToString().Split(new char[] { ' ' })[0];
			//return "handler_" + name + "_" + e.Name;
            return name + "_" + e.Name;
        }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:12,代码来源:SampleEventBindingService.cs

示例4: register

        /// <summary>
        /// Register new component.
        /// </summary>
        /// <param name="c">component</param>
        public void register(IComponent c)
        {
            if(String.IsNullOrEmpty(c.Condition)) {
                throw new ComponentException("Condition for '{0}' is null or empty.", c.ToString());
            }

            Type ident = c.GetType();
            if(components.ContainsKey(ident)) {
                throw new ComponentException("IComponent '{0}:{1}' is already registered.", ident, c.ToString());
            }
            components[ident] = c;
        }
开发者ID:hilbertdu,项目名称:vsSolutionBuildEvent,代码行数:16,代码来源:Bootloader.cs

示例5: ReferenceHolder

            internal ReferenceHolder(string trailingName, object reference, IComponent sitedComponent)
            {
                this.trailingName = trailingName;
                this.reference = reference;
                this.sitedComponent = sitedComponent;

                Debug.Assert(trailingName != null, "Expected a trailing name");
                Debug.Assert(reference != null, "Expected a reference");

#if DEBUG

                Debug.Assert(sitedComponent != null, "Expected a sited component");
                if (sitedComponent != null)
                    Debug.Assert(sitedComponent.Site != null, "Sited component is not really sited: " + sitedComponent.ToString());
                if (sitedComponent != null && sitedComponent.Site != null)
                    Debug.Assert(sitedComponent.Site.Name != null, "Sited component has no name: " + sitedComponent.ToString());

#endif // DEBUG
            }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:19,代码来源:ReferenceService.cs


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