• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ReferenceType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SetupReferenceNameInputBox

        protected void SetupReferenceNameInputBox(TextBox textBox, ReferenceType referenceType)
        {
            Verify.Argument.IsNotNull(textBox, "textBox");

            textBox.KeyPress += OnRevisionInputBoxKeyPress;
            textBox.Tag = referenceType;
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:7,代码来源:GitDialogBase.cs


示例2: AddNZB

 public NZBDownload AddNZB(string filePath, ReferenceType refType = ReferenceType.FilePath)
 {
     Downloads.Add(new NZBDownload()
     {
         NZBDoc = new NZBDocument(filePath, refType),
         Status = NZBDLStatus.NotStarted
     });
     return Downloads.Last();
 }
开发者ID:guslubudus,项目名称:NZB-DLM-.NET,代码行数:9,代码来源:NZBDownloadManager.cs


示例3: ClassPrepareEventArgs

        internal ClassPrepareEventArgs(VirtualMachine virtualMachine, SuspendPolicy suspendPolicy, EventRequest request, ThreadReference thread, string signature, ReferenceType type)
            : base(virtualMachine, suspendPolicy, request, thread)
        {
            Contract.Requires<ArgumentNullException>(signature != null, "signature");
            Contract.Requires<ArgumentException>(!string.IsNullOrEmpty(signature));

            _signature = signature;
            _type = type;
        }
开发者ID:fjnogueira,项目名称:JavaForVS,代码行数:9,代码来源:ClassPrepareEventArgs.cs


示例4: ExceptionRequest

        public ExceptionRequest(VirtualMachine virtualMachine, ReferenceType exceptionType, bool notifyWhenCaught, bool notifyWhenUncaught)
            : base(virtualMachine)
        {
            Contract.Requires(virtualMachine != null);

            _exceptionType = exceptionType;
            _notifyWhenCaught = notifyWhenCaught;
            _notifyWhenUncaught = notifyWhenUncaught;
            Modifiers.Add(Types.EventRequestModifier.ExceptionFilter(exceptionType != null ? exceptionType.ReferenceTypeId : default(Types.ReferenceTypeId), notifyWhenCaught, notifyWhenUncaught));
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:10,代码来源:ExceptionRequest.cs


示例5: GetReferencePart

        public static IReferencePart GetReferencePart(ReferenceType referenceType)
        {
            if (referenceType == ReferenceType.CollectionPart)
            return new ReferencePartCollection();

             if (referenceType == ReferenceType.PropertyPart)
            return new ReferencePartProperty();

             return new ReferencePartType();
        }
开发者ID:bsimser,项目名称:xeva,代码行数:10,代码来源:ReferencePartFactory.cs


示例6: 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


示例7: ToString

 public string ToString(ReferenceType referenceType)
 {
     switch (referenceType)
     {
         case ReferenceType.Reference:
             return string.Format("Reference=*\\G{0}#{1}#0#{2}#{3}", Guid, Version, Filename, Description);
         case ReferenceType.Component:
             return string.Format("Object={0}#{1}#0#;{2}", Guid, Version, Filename);
         default:
             throw new ArgumentOutOfRangeException("referenceType");
     }
 }
开发者ID:DavidMoore,项目名称:Foundation,代码行数:12,代码来源:VisualBasicReference.cs


示例8: GetState

 public ReferenceState GetState(string fullName, ReferenceType type)
 {
     ReferenceState state;
     if(_states.TryGetValue(fullName, out state))
     {
         if(state.ReferenceType != type)
         {
             state = null;
         }
     }
     return state;
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:12,代码来源:RefsState.cs


示例9: ReferenceChange

 public ReferenceChange(
     ReferenceType referenceType,
     string fullName, string name,
     Hash oldHash, Hash newHash,
     ReferenceChangeType changeType)
 {
     _referenceType = referenceType;
     _fullName = fullName;
     _name = name;
     _oldHash = oldHash;
     _newHash = newHash;
     _changeType = changeType;
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:13,代码来源:RefrenceChange.cs


示例10: RecreateEndPath

		/// <summary>
		/// Recreates appropriate folder for reference mark files.
		/// </summary>
		private static void RecreateEndPath(ReferenceType referenceType, string referencesDirectory)
		{
			string path = GetEndPath(referenceType, referencesDirectory);
			if (Directory.Exists(path))
			{
				Directory.Delete(path, true);
				Thread.Sleep(500);
			}

			Directory.CreateDirectory(path);
			Thread.Sleep(500);

			MarkUpdatedFolder(referencesDirectory);
		}
开发者ID:penartur,项目名称:CCNet.Extensions,代码行数:17,代码来源:ReferenceMark.cs


示例11: RefsState

        private RefsState(Repository repository, ReferenceType referenceTypes)
        {
            _states = new Dictionary<string, ReferenceState>();

            if((referenceTypes & ReferenceType.LocalBranch) == ReferenceType.LocalBranch)
            {
                CaptureHeads(repository);
            }
            if((referenceTypes & ReferenceType.RemoteBranch) == ReferenceType.RemoteBranch)
            {
                CaptureRemotes(repository);
            }
            if((referenceTypes & ReferenceType.Tag) == ReferenceType.Tag)
            {
                CaptureTags(repository);
            }
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:17,代码来源:RefsState.cs


示例12: ReferenceInfo

		public ReferenceInfo(Project project, BuildItem item)
		{
            _project = project;
            _item = item;
            _refType = (ReferenceType)Enum.Parse(typeof(ReferenceType), item.Name);

			if (_refType == ReferenceType.ProjectReference)
            {
				_assembly = new AssemblyName();
            }
            else if (RefType == ReferenceType.Reference)
            {
				string name = _item.Include;
				if (name.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || name.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
					name = name.Substring(0, name.Length - 4);
				_assembly = new AssemblyName(name);
            }
            else
                throw new ApplicationException("Unkown reference type " + item.Name);
		}
开发者ID:hivie7510,项目名称:csharptest-net,代码行数:20,代码来源:ReferenceInfo.cs


示例13: NZBRootBaseClass

        public NZBRootBaseClass(string objectRef, ReferenceType refType = ReferenceType.FilePath)
        {
            // init XmlWriter settings
            settings.Indent = false;
            settings.Encoding = Encoding.GetEncoding("iso-8859-1");
            settings.NamespaceHandling = NamespaceHandling.OmitDuplicates;

            if (string.IsNullOrEmpty(objectRef))
                return;
            switch (refType)
            {
                case ReferenceType.SerializedData: 
                    Deserialize(objectRef);
                    break;
                case ReferenceType.FilePath:
                    using (var sr = new StreamReader(objectRef, true))
                    {
                        Deserialize(sr.ReadToEnd());
                    }
                    break;
            }
        }
开发者ID:guslubudus,项目名称:NZB-DLM-.NET,代码行数:22,代码来源:NZBRootBaseClass.cs


示例14: OnGUI

        void OnGUI()
        {
            EditorGUILayout.BeginHorizontal ();

            refType = (ReferenceType)EditorGUILayout.EnumPopup (refType, EditorStyles.toolbarPopup);

            EditorGUILayout.EndHorizontal ();

            GUIStyle styles = new GUIStyle ();
            styles.margin.left = 10;
            styles.margin.top = 5;

            current = EditorGUILayout.BeginScrollView (current);

            try {
                switch (refType) {
                case ReferenceType.AllReferencingBy:
                    OnGUIAllObjectReferenceFrom ();
                    break;
                case ReferenceType.AllReferencing:
                    OnGUIAllObjectReferenceTo ();
                    break;
                case ReferenceType.AllComponents:
                    OnGUIAllComponent ();
                    break;
                case ReferenceType.TagAndLayers:
                    tagAndLayers.OnGUI ();
                    break;
                }

            } catch (UnityEngine.ExitGUIException e) {
                Debug.LogWarning (e.ToString ());
            } catch (System.Exception e) {
                Debug.LogWarning (e.ToString ());
            }

            EditorGUILayout.EndScrollView ();
        }
开发者ID:mob-sakai,项目名称:ReferenceExplorer,代码行数:38,代码来源:ReferenceAllObjectWindow.cs


示例15: ParseReference

		//FIXME: change return type to bool, on false, extra.Add (reference)
		void ParseReference (string reference, bool usePrefix, MakefileVar refVar, int len, ReferenceType refType, 
				DotNetProject project)
		{
			string rname = reference;
			// .StartsWith "$("
			if (rname.Length > 3 && rname [0] == '$' && rname [1] == '(' && rname [rname.Length - 1] == ')') {
				if (!UseAutotools) {
					refVar.Extra.Add (reference);
					return;
				}

				// Autotools based project

				if (!rname.EndsWith ("_LIBS)")) {
					//Not a pkgconfig *_LIBS var
					refVar.Extra.Add (reference);
					return;
				}

				string pkgVarName = rname.Substring (2, rname.Length - 3).Replace ("_LIBS", String.Empty);
				List<PackageContent> pkgNames = ConfiguredPackages.GetPackageContentFromVarName (pkgVarName);
				if (pkgNames == null) {
					 LoggingService.LogWarning  ("Package named '{0}' not found in configure.in. Ignoring reference to '{1}'.",
						pkgVarName, rname);
					refVar.Extra.Add (reference);
					return;
				}

				bool added = false;
				foreach (PackageContent packageContent in pkgNames) {
					if (ReferencedPackages.Contains (packageContent.Name)) {
						added = true;
						continue;
					}

					// Add all successfully added packages to ReferencedPackages
					foreach (string referencedName in packageContent.AllReferencedNames) {
						if (LoadPackageReference (referencedName, project, refVar.Prefix)) {
							ReferencedPackages.Add (referencedName);
							added = true;
						}
					}
				}

				// none of the packages could be added
				if (!added)
					refVar.Extra.Add (reference);

				return;
			}

			// .StartsWith "-pkg:"
			if (rname.Length >= 5 && rname [0] == '-' && rname [1] == 'p' && rname [2] == 'k' && rname [3] == 'g' && rname [4] == ':') {
				string pkgName = rname.Substring (5);
				//-pkg:foo,bar
				foreach (string s in pkgName.Split (new char [] {','}, StringSplitOptions.RemoveEmptyEntries)) {
					if (ReferencedPackages.Contains (s))
						continue;

					if (LoadPackageReference (s, project, refVar.Prefix))
						ReferencedPackages.Add (s);
					else
						refVar.Extra.Add ("-pkg:" + s);
				}

				return;
			}

			if (usePrefix && String.Compare (refVar.Prefix, 0, rname, 0, len) == 0)
				rname = rname.Substring (len);

			//FIXME: try/catch around the split refs ?
			bool varFound = false;
			foreach (string r in rname.Split (new char [] {','}, StringSplitOptions.RemoveEmptyEntries)) {
				string refname = r;
				if (refname.Length >= 2 && refname [0] == '$' && refname [1] == '(' && !UseAutotools) {
					//Eg. -r:$(top_builddir)/foo.dll
					refVar.Extra.Add (reference);
					continue;
				}

				varFound = false;
				refname = ResolveBuildVars (refname, ref varFound);
				EncodeValues [refVar.Name] |= varFound;

				string fullpath = Path.GetFullPath (Path.Combine (BaseDirectory, refname));
				
				// if refname is part of a package then add as gac
				// but don't do it if the refname exactly matches a file name in the project dir
				if (refname.IndexOf (Path.DirectorySeparatorChar) < 0 && !File.Exists (fullpath) &&
					ParseReferenceAsGac (refname, project) != null)
					continue;
				
				if (TryGetExistingGacRef (fullpath) != null)
					continue;

				if (refname.IndexOf (Path.DirectorySeparatorChar) < 0) {
					// Check that its a valid assembly
					string fullname = null;
//.........这里部分代码省略.........
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:101,代码来源:MakefileData.cs


示例16: ReadReferences

		void ReadReferences (MakefileVar refVar, ReferenceType refType, string id, DotNetProject project)
		{
			if (String.IsNullOrEmpty (refVar.Name) || project == null)
				return;

			//All filenames are treated as relative to the Makefile path
			List<string> references = Makefile.GetListVariable (refVar.Name);
			if (references == null) {
				string msg = GettextCatalog.GetString (
					"Makefile variable '{0}' not found. Skipping syncing of all '{1}' references for project {2}.",
					refVar.Name, id, project.Name);
				LoggingService.LogWarning (msg);
				monitor.ReportWarning (msg);
				SaveReferences = false;
				return;
			}
			//FIXME: Trim?
			bool usePrefix = !String.IsNullOrEmpty (refVar.Prefix);
			int len = 0;
			if (refVar.Prefix != null)
				len = refVar.Prefix.Length;

			ReferencedPackages.Clear ();
			foreach (string r in references) {
				//Handle -r:System,System.Data also
				try { 
					ParseReference (r, usePrefix, refVar, len, refType, project);
				} catch (Exception e) {
					string msg = GettextCatalog.GetString ("Unable to parse reference '{0}' for project '{1}'. Ignoring.", r, project.Name);
					LoggingService.LogWarning (msg, e);
					monitor.ReportWarning (msg);
					refVar.Extra.Add (r);
				}
			}

			referencedPackages = null;
		}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:37,代码来源:MakefileData.cs


示例17: WriteReferences

		bool WriteReferences (MakefileVar refVar, ReferenceType refType, bool makeRelative, string id)
		{
			//Reference vars can be shared too, so use existing list
			//Eg. REF for both Gac and Asm ref
			List<string> references = Makefile.GetListVariable (refVar.Name);
			if (references == null) {
				//Var not found, skip
				string msg = GettextCatalog.GetString (
                                        "Makefile variable '{0}' not found. Skipping syncing of '{1}' references.", refVar.Name, id);
				LoggingService.LogWarning (msg);
				monitor.ReportWarning (msg);
				return false;
			}

			//if .Value is true
			//	key -> Varname, Emit as $key_LIBS
			//if .Value is false
			//	key -> pkgname, emit as -pkg:$key
			Dictionary<string, bool> hasAcSubstPackages = new Dictionary<string, bool> ();

			foreach (ProjectReference pr in ((DotNetProject)OwnerProject).References) {
				if (pr.ReferenceType != refType)
					continue;

				string refstr = String.Empty;
				switch (refType) {
				case ReferenceType.Gac:
					//Assemblies coming from packages are always added as Gac
					refstr = GacRefToString (pr, hasAcSubstPackages, refVar);
					if (refstr == null)
						continue;
					break;
				case ReferenceType.Assembly:
					refstr = AsmRefToString (pr.Reference, refVar, false);
					break;
				case ReferenceType.Project:
					refstr = ProjectRefToString (pr, refVar);
					if (refstr == null)
						continue;
					break;
				default:
					//not supported
					continue;
				}

				references.Add (String.Format ("{0}{1}", refVar.Prefix, refstr));
			}

			//Add packages
			foreach (KeyValuePair<string, bool> pair in hasAcSubstPackages) {
				if (pair.Value)
					references.Add (String.Format ("$({0}_LIBS)", pair.Key));
				else
					references.Add (String.Format ("-pkg:{0}", pair.Key));
			}

			foreach (string s in refVar.Extra)
				references.Add (s);

			Makefile.SetListVariable (refVar.Name, references);
			return true;
		}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:62,代码来源:MakefileData.cs


示例18: FindReference

		TreeIter FindReference (ReferenceType referenceType, string reference)
		{
			TreeIter looping_iter;
			if (refTreeStore.GetIterFirst (out looping_iter)) {
				do {
					ProjectReference pref = (ProjectReference) refTreeStore.GetValue (looping_iter, ProjectReferenceColumn);
					if (pref.Reference == reference && pref.ReferenceType == referenceType) {
						return looping_iter;
					}
				} while (refTreeStore.IterNext (ref looping_iter));
			}
			return TreeIter.Zero;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:13,代码来源:SelectReferenceDialog.cs


示例19: RemoveReference

		public void RemoveReference (ReferenceType referenceType, string reference)
		{
			TreeIter iter = FindReference (referenceType, reference);
			if (iter.Equals (TreeIter.Zero))
				return;
			refTreeStore.Remove (ref iter);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:SelectReferenceDialog.cs


示例20: UndefinedReferenceException

 protected UndefinedReferenceException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if (info == null)
     {
         throw new ArgumentNullException("info");
     }
     m_name = info.GetString("name");
     m_type = (ReferenceType)Enum.Parse(typeof(ReferenceType), info.GetString("type"));
 }
开发者ID:Aliceljm1,项目名称:kiss-project.web,代码行数:10,代码来源:jscriptexception.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Referrer类代码示例发布时间:2022-05-24
下一篇:
C# Reference类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap