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


C# ReferenceType.ToString方法代码示例

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


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

示例1: MakeReference

		public void MakeReference(AssemblyName asmName, string fullPath)
		{
			_refType = ReferenceType.Reference;
			_item.Name = _refType.ToString();
			this.Assembly = asmName;
			this.HintPath = fullPath;
			_item.RemoveMetadata("Name");
			_item.RemoveMetadata("Project");
			_item.RemoveMetadata("Package");
		}
开发者ID:hivie7510,项目名称:csharptest-net,代码行数:10,代码来源:ReferenceInfo.cs

示例2: GetEndPath

		/// <summary>
		/// Gets appropriate path for reference mark files.
		/// </summary>
		private static string GetEndPath(ReferenceType referenceType, string referencesDirectory)
		{
			return Path.Combine(referencesDirectory, referenceType.ToString());
		}
开发者ID:penartur,项目名称:CCNet.Extensions,代码行数:7,代码来源:ReferenceMark.cs

示例3: AddReference

        public void AddReference(ReferenceType referenceType, string referenceName, string referenceLocation)
        {
            TreeIter looping_iter;
            if (refTreeStore.GetIterFirst (out looping_iter)) {
                do {
                    try {
                        if (referenceLocation == (string)refTreeStore.GetValue (looping_iter, 2) && referenceName == (string)refTreeStore.GetValue (looping_iter, 0)) {
                            return;
                        }
                    } catch {
                    }
                } while (refTreeStore.IterNext (ref looping_iter));
            }

            ProjectReference tag;
            switch (referenceType) {
                case ReferenceType.Typelib:
                    tag = new ProjectReference(referenceType, referenceName + "|" + referenceLocation);
                    break;
                case ReferenceType.Project:
                    tag = new ProjectReference(referenceType, referenceName);
                    break;
                default:
                    tag = new ProjectReference(referenceType, referenceLocation);
                    break;

            }
            TreeIter ni = refTreeStore.AppendValues (referenceName, referenceType.ToString (), referenceLocation, tag);
            ReferencesTreeView.ScrollToCell (refTreeStore.GetPath (ni), null, false, 0, 0);
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:30,代码来源:SelectReferenceDialog.cs

示例4: AddReference

		public void AddReference(ReferenceType referenceType, string referenceName, string referenceLocation, object tag)
		{
			foreach (ListViewItem item in referencesListView.Items) {
				if (referenceLocation == item.SubItems[2].Text && referenceName == item.Text ) {
					return;
				}
			}
			
			ListViewItem newItem = new ListViewItem(new string[] {referenceName, referenceType.ToString(), referenceLocation});
			switch (referenceType) {
				case ReferenceType.Typelib:
					newItem.Tag = new ComReferenceProjectItem(configureProject, (TypeLibrary)tag);
					break;
				case ReferenceType.Project:
					newItem.Tag = new ProjectReferenceProjectItem(configureProject, (IProject)tag);
					break;
				case ReferenceType.Gac:
					newItem.Tag = new ReferenceProjectItem(configureProject, referenceLocation);
					break;
				case ReferenceType.Assembly:
					ReferenceProjectItem assemblyReference = new ReferenceProjectItem(configureProject);
					assemblyReference.Include = Path.GetFileNameWithoutExtension(referenceLocation);
					assemblyReference.HintPath = FileUtility.GetRelativePath(configureProject.Directory, referenceLocation);
					assemblyReference.SpecificVersion = false;
					newItem.Tag = assemblyReference;
					break;
				default:
					throw new System.NotSupportedException("Unknown reference type:" + referenceType);
			}
			
			referencesListView.Items.Add(newItem);
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:32,代码来源:SelectReferenceDialog.cs


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