本文整理汇总了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");
}
示例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());
}
示例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);
}
示例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);
}