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


C# ReferenceType类代码示例

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


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


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