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


C# IUnresolvedMember类代码示例

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


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

示例1: CreateEventCreationCompletionData

 public ICompletionData CreateEventCreationCompletionData(string varName, IType delegateType, IEvent evt,
                                                          string parameterDefinition,
                                                          IUnresolvedMember currentMember,
                                                          IUnresolvedTypeDefinition currentType)
 {
     return new CompletionData(varName);
 }
开发者ID:CSRedRat,项目名称:Omnisharp,代码行数:7,代码来源:CompletionDataFactory.cs

示例2: Update

		/// <summary>
		/// Updates the member model with the specified new member.
		/// </summary>
		public void Update(IUnresolvedMember newMember)
		{
			if (newMember == null)
				throw new ArgumentNullException("newMember");
			this.member = newMember;
			RaisePropertyChanged();
		}
开发者ID:ratoy,项目名称:SharpDevelop,代码行数:10,代码来源:MemberModel.cs

示例3: MemberModel

		public MemberModel(IEntityModelContext context, IUnresolvedMember member)
		{
			if (context == null)
				throw new ArgumentNullException("context");
			if (member == null)
				throw new ArgumentNullException("member");
			this.context = context;
			this.member = member;
		}
开发者ID:ratoy,项目名称:SharpDevelop,代码行数:9,代码来源:MemberModel.cs

示例4: NewPartialCompletionData

 public NewPartialCompletionData(int declarationBegin, IUnresolvedTypeDefinition type, IUnresolvedMember member)
 {
     DeclarationBeginningIndex = declarationBegin;
     Type = type;
     Member = member;
     // check this:
     DeclarationCategory = type.SymbolKind.ResolveDeclarationCategoryFromSymbolKind();
     SetDefaultText(member.Name);
 }
开发者ID:uluhonolulu,项目名称:QCCodingServices.NET,代码行数:9,代码来源:NewPartialCompletionData.cs

示例5: Node

        /// <summary>
        ///   Initializes a new instance with no child nodes for the
        ///   given member.
        /// </summary>
        public Node(IUnresolvedMember member, IDocument document) {
            this.ChildNodes = null;
            this.Location = QuickFix.ForNonBodyRegion(member, document);

            // Fields' BodyRegion does not include their name for some
            // reason. To prevent the field's name missing, include
            // the whole region for them.
			if (member.SymbolKind == SymbolKind.Field)
                this.Location.Text += member.Name;
        }
开发者ID:Reese-D,项目名称:my_emacs,代码行数:14,代码来源:Node.cs

示例6: EventCreationCompletionData

		public EventCreationCompletionData(string handlerName, IType delegateType, IEvent evt, string parameterList, IUnresolvedMember callingMember, IUnresolvedTypeDefinition declaringType, CSharpResolver contextAtCaret)
		{
			if (string.IsNullOrEmpty(handlerName)) {
				handlerName = (evt != null ? evt.Name : "Handle");
			}
			this.handlerName = handlerName;
			this.DisplayText = "<Create " + handlerName + ">";
			this.delegateTypeReference = delegateType.ToTypeReference();
			this.isStatic = callingMember != null && callingMember.IsStatic;
		}
开发者ID:fanyjie,项目名称:SharpDevelop,代码行数:10,代码来源:EventCreationCompletionData.cs

示例7: EventCreationCompletionData

		public EventCreationCompletionData(string handlerName, IType delegateType, IEvent evt, string parameterList, IUnresolvedMember callingMember, IUnresolvedTypeDefinition declaringType, CSharpResolver contextAtCaret)
		{
			if (string.IsNullOrEmpty(handlerName)) {
				handlerName = (evt != null ? evt.Name : "Handle");
			}
			this.handlerName = handlerName;
			this.DisplayText = StringParser.Parse("${res:CSharpBinding.Refactoring.EventCreation.EventHandlerText}", new[] { new StringTagPair("HandlerName", handlerName) });
			this.delegateTypeReference = delegateType.ToTypeReference();
			this.isStatic = callingMember != null && callingMember.IsStatic;
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:10,代码来源:EventCreationCompletionData.cs

示例8: EventCompletionData

            public EventCompletionData(string varName, IType delegateType, IEvent evt, string parameterDefinition, IUnresolvedMember currentMember, IUnresolvedTypeDefinition currentType)
            {
                SetDefaultText(varName);
                DeclarationCategory = DeclarationCategory.Event;
                // what should we do with parameterDefinition???
                DelegateType = delegateType;
                CurrentMember = currentMember;
                CurrentType = currentType;

                //Description = currentMember
            }
开发者ID:uluhonolulu,项目名称:QCCodingServices.NET,代码行数:11,代码来源:EventCompletionData.cs

示例9: EventCreationCompletionData

		public EventCreationCompletionData(string varName, IType delegateType, IEvent evt, string parameterList, IUnresolvedMember callingMember, IUnresolvedTypeDefinition declaringType, CSharpResolver contextAtCaret) : base(evt)
		{
			if (string.IsNullOrEmpty(varName)) {
				this.DisplayText = "Create handler for " + (evt != null ? evt.Name : "");
			}
			else {
				this.DisplayText = "Create handler for " + char.ToUpper(varName[0]) + varName.Substring(1) + (evt != null ? evt.Name : "");
			}
			
			this.DisplayText = "<" + this.DisplayText + ">";
			this.eventDefinition = evt;
			this.delegateType = delegateType;
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:13,代码来源:EventCreationCompletionData.cs

示例10: GetLocalVariableTypes

			public IReadOnlyList<ITypeReference> GetLocalVariableTypes(IUnresolvedMember member)
			{
				rwLock.EnterReadLock();
				try {
					ITypeReference[] result;
					if (localVariableTypes.TryGetValue(member, out result))
						return result;
					else
						return EmptyList<ITypeReference>.Instance;
				} finally {
					rwLock.ExitReadLock();
				}
			}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:13,代码来源:TypeSystemExtensions.cs

示例11: CanMatch

		bool CanMatch(IUnresolvedMember member)
		{
			switch (member.SymbolKind) {
				case SymbolKind.Field:
					return memberType == 'F';
				case SymbolKind.Property:
				case SymbolKind.Indexer:
					return memberType == 'P';
				case SymbolKind.Event:
					return memberType == 'E';
				case SymbolKind.Method:
				case SymbolKind.Operator:
				case SymbolKind.Constructor:
				case SymbolKind.Destructor:
					return memberType == 'M';
				default:
					throw new NotSupportedException(member.SymbolKind.ToString());
			}
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:19,代码来源:IdStringMemberReference.cs

示例12: CanMatch

		bool CanMatch(IUnresolvedMember member)
		{
			switch (member.EntityType) {
				case EntityType.Field:
					return memberType == 'F';
				case EntityType.Property:
				case EntityType.Indexer:
					return memberType == 'P';
				case EntityType.Event:
					return memberType == 'E';
				case EntityType.Method:
				case EntityType.Operator:
				case EntityType.Constructor:
				case EntityType.Destructor:
					return memberType == 'M';
				default:
					throw new NotSupportedException(member.EntityType.ToString());
			}
		}
开发者ID:adisik,项目名称:simple-assembly-explorer,代码行数:19,代码来源:IdStringMemberReference.cs

示例13: EventCreationCompletionData

		public EventCreationCompletionData (CSharpCompletionTextEditorExtension ext, string varName, IType delegateType, IEvent evt, string parameterList, IUnresolvedMember callingMember, IUnresolvedTypeDefinition declaringType) : base (null)
		{
			if (string.IsNullOrEmpty (varName)) {
				this.DisplayText   = "Handle" + (evt != null ? evt.Name : "");
			} else {
				this.DisplayText   = "Handle" + Char.ToUpper (varName[0]) + varName.Substring (1) + (evt != null ? evt.Name : "");
			}
			
			if (declaringType != null && declaringType.Members.Any (m => m.Name == this.DisplayText)) {
				for (int i = 1; i < 10000; i++) {
					if (!declaringType.Members.Any (m => m.Name == this.DisplayText + i)) {
						this.DisplayText = this.DisplayText + i.ToString ();
						break;
					}
				}
			}
			this.editor        = ext.TextEditorData;
			this.parameterList = parameterList;
			this.callingMember = callingMember;
			this.Icon          = "md-newmethod";
			this.initialOffset = editor.Caret.Offset;
		}
开发者ID:segaman,项目名称:monodevelop,代码行数:22,代码来源:EventCreationCompletionData.cs

示例14: AddNewMember

		public static void AddNewMember (ITypeDefinition type, IUnresolvedTypeDefinition part, IUnresolvedMember newMember, bool implementExplicit = false)
		{
			bool isOpen;
			var data = TextFileProvider.Instance.GetTextEditorData (part.Region.FileName, out isOpen);
			var parsedDocument = TypeSystemService.ParseFile (data.FileName, data.MimeType, data.Text);
			
			var insertionPoints = GetInsertionPoints (data, parsedDocument, part);
			
			var suitableInsertionPoint = GetSuitableInsertionPoint (insertionPoints, part, newMember);
			
			var generator = CreateCodeGenerator (data, type.Compilation);

			generator.IndentLevel = CalculateBodyIndentLevel (parsedDocument.GetInnermostTypeDefinition (type.Region.Begin));
			var generatedCode = generator.CreateMemberImplementation (type, part, newMember, implementExplicit);
			suitableInsertionPoint.Insert (data, generatedCode.Code);
			if (!isOpen) {
				try {
					File.WriteAllText (type.Region.FileName, data.Text);
				} catch (Exception e) {
					LoggingService.LogError (GettextCatalog.GetString ("Failed to write file '{0}'.", type.Region.FileName), e);
					MessageService.ShowError (GettextCatalog.GetString ("Failed to write file '{0}'.", type.Region.FileName));
				}
			}
		}
开发者ID:dodev,项目名称:monodevelop,代码行数:24,代码来源:CodeGenerationService.cs

示例15: GetCurrentMembers

		public void GetCurrentMembers(int offset, out IUnresolvedTypeDefinition currentType, out IUnresolvedMember currentMember)
		{
			//var document = engine.document;
			var location = document.GetLocation(offset);
			
			currentType = null;
			
			foreach (var type in unresolvedFile.TopLevelTypeDefinitions) {
				if (type.Region.Begin < location)
					currentType = type;
			}
			currentType = FindInnerType (currentType, location);
			
			// location is beyond last reported end region, now we need to check, if the end region changed
			if (currentType != null && currentType.Region.End < location) {
				if (!IsInsideType (currentType, location))
					currentType = null;
			}
			currentMember = null;
			if (currentType != null) {
				foreach (var member in currentType.Members) {
					if (member.Region.Begin < location && (currentMember == null || currentMember.Region.Begin < member.Region.Begin))
						currentMember = member;
				}
			}
			
			// location is beyond last reported end region, now we need to check, if the end region changed
			// NOTE: Enums are a special case, there the "last" field needs to be treated as current member
			if (currentMember != null && currentMember.Region.End < location && currentType.Kind != TypeKind.Enum) {
				if (!IsInsideType (currentMember, location))
					currentMember = null;
			}/*
			var stack = GetBracketStack (engine.GetMemberTextToCaret ().Item1);
			if (stack.Count == 0)
				currentMember = null;*/
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:36,代码来源:ICompletionContextProvider.cs


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