Exemplo n.º 1
0
		Task<List<ReferenceSegment>> IAssemblyBrowserNodeBuilder.DisassembleAsync (TextEditor data, ITreeNavigator navigator)
		{
			if (MethodDefinitionNodeBuilder.HandleSourceCodeEntity (navigator, data)) 
				return EmptyReferenceSegmentTask;
			var evt = (IEvent)navigator.DataItem;
			return MethodDefinitionNodeBuilder.DisassembleAsync (data, rd => rd.DisassembleEvent (evt.ParentModule.PEFile, (System.Reflection.Metadata.EventDefinitionHandle)evt.MetadataToken));
		}
Exemplo n.º 2
0
        Task <List <ReferenceSegment> > IAssemblyBrowserNodeBuilder.DisassembleAsync(TextEditor data, ITreeNavigator navigator)
        {
            if (MethodDefinitionNodeBuilder.HandleSourceCodeEntity(navigator, data))
            {
                return(EmptyReferenceSegmentTask);
            }
            var property = (IProperty)navigator.DataItem;

            return(MethodDefinitionNodeBuilder.DisassembleAsync(data, rd => rd.DisassembleProperty(property.ParentModule.PEFile, (System.Reflection.Metadata.PropertyDefinitionHandle)property.MetadataToken)));
        }
Exemplo n.º 3
0
        public Task <List <ReferenceSegment> > DisassembleAsync(TextEditor data, ITreeNavigator navigator)
        {
            var assemblyLoader  = (AssemblyLoader)navigator.DataItem;
            var compilationUnit = assemblyLoader.Assembly;

            if (compilationUnit == null)
            {
                LoggingService.LogError("Can't get cecil object for assembly:" + assemblyLoader.Assembly.FullName);
                return(Task.FromResult(new List <ReferenceSegment> ()));
            }
            return(MethodDefinitionNodeBuilder.DisassembleAsync(data, rd => rd.WriteAssemblyHeader(compilationUnit)));
        }
        Task <List <ReferenceSegment> > IAssemblyBrowserNodeBuilder.DisassembleAsync(TextEditor data, ITreeNavigator navigator)
        {
            if (MethodDefinitionNodeBuilder.HandleSourceCodeEntity(navigator, data))
            {
                return(EmptyReferenceSegmentTask);
            }
            var field = (IField)navigator.DataItem;

            if (field == null)
            {
                return(EmptyReferenceSegmentTask);
            }
            return(MethodDefinitionNodeBuilder.DisassembleAsync(data, rd => rd.DisassembleField(field.ParentModule.PEFile, (System.Reflection.Metadata.FieldDefinitionHandle)field.MetadataToken)));
        }
        public Task <List <ReferenceSegment> > DisassembleAsync(TextEditor data, ITreeNavigator navigator)
        {
            if (MethodDefinitionNodeBuilder.HandleSourceCodeEntity(navigator, data))
            {
                return(EmptyReferenceSegmentTask);
            }
            var type = (ITypeDefinition)navigator.DataItem;

            if (type == null)
            {
                return(EmptyReferenceSegmentTask);
            }

            return(MethodDefinitionNodeBuilder.DisassembleAsync(data, rd => rd.DisassembleType(type.ParentModule.PEFile, (System.Reflection.Metadata.TypeDefinitionHandle)type.MetadataToken)));
        }