Ejemplo n.º 1
0
		public DocumentTabContent Deserialize(Guid guid, ISettingsSection section, IDocumentTabContentFactoryContext context) {
			if (guid != GUID_SerializedContent)
				return null;

			var filename = section.Attribute<string>("filename");
			return hexViewDocumentTabContentCreator.Value.TryCreate(filename);
		}
		public DocumentTabContent Deserialize(Guid guid, ISettingsSection section, IDocumentTabContentFactoryContext context) {
			if (guid != GUID_SerializedContent)
				return null;

			var langGuid = section.Attribute<Guid?>("Language") ?? DecompilerConstants.LANGUAGE_CSHARP;
			var language = DecompilerService.FindOrDefault(langGuid);
			return new DecompileDocumentTabContent(this, context.Nodes, language);
		}
Ejemplo n.º 3
0
		public DocumentTabContent Deserialize(Guid guid, ISettingsSection section, IDocumentTabContentFactoryContext context) {
			if (guid != GUID_SerializedContent)
				return null;
			var hexNode = context.Nodes.Length != 1 ? null : context.Nodes[0] as HexNode;
			if (hexNode == null)
				return null;

			return new HexDocumentTabContent(hexNode);
		}
Ejemplo n.º 4
0
		public DocumentTabContent Create(IDocumentTabContentFactoryContext context) {
			if (context.Nodes.Length == 1) {
				var hexNode = context.Nodes[0] as HexNode;
				if (hexNode != null)
					return new HexDocumentTabContent(hexNode);
			}

			return null;
		}
		public DocumentTabContent Deserialize(Guid guid, ISettingsSection section, IDocumentTabContentFactoryContext context) {
			if (guid == GUID_SerializedContent) {
				// Serialize() doesn't add anything extra to 'section', but if it did, you'd have to
				// get that info here and return null if the serialized data wasn't found.
				var node = context.Nodes.Length == 1 ? context.Nodes[0] as AssemblyChildNode : null;
				if (node != null)
					return new AssemblyChildNodeTabContent(node);
			}
			return null;
		}
Ejemplo n.º 6
0
        public DocumentTabContent Deserialize(Guid guid, ISettingsSection section, IDocumentTabContentFactoryContext context)
        {
            if (guid != GUID_SerializedContent)
            {
                return(null);
            }

            var filename = section.Attribute <string>("filename");

            return(hexViewDocumentTabContentCreator.Value.TryCreate(filename));
        }
        public IDocumentTabContent Deserialize(Guid guid, ISettingsSection section, IDocumentTabContentFactoryContext context)
        {
            if (guid != GUID_SerializedContent)
            {
                return(null);
            }

            var langGuid = section.Attribute <Guid?>("Language") ?? DecompilerConstants.LANGUAGE_CSHARP;
            var language = DecompilerService.FindOrDefault(langGuid);

            return(new DecompileDocumentTabContent(this, context.Nodes, language));
        }
Ejemplo n.º 8
0
        public DocumentTabContent Create(IDocumentTabContentFactoryContext context)
        {
            if (context.Nodes.Length == 1)
            {
                if (context.Nodes[0] is HexNode hexNode)
                {
                    return(new HexDocumentTabContent(hexNode));
                }
            }

            return(null);
        }
Ejemplo n.º 9
0
        public IDocumentTabContent Create(IDocumentTabContentFactoryContext context)
        {
            if (context.Nodes.Length == 1)
            {
                var hexNode = context.Nodes[0] as HexNode;
                if (hexNode != null)
                {
                    return(new HexDocumentTabContent(hexNode));
                }
            }

            return(null);
        }
 public DocumentTabContent Deserialize(Guid guid, ISettingsSection section, IDocumentTabContentFactoryContext context)
 {
     if (guid == GUID_SerializedContent)
     {
         // Serialize() doesn't add anything extra to 'section', but if it did, you'd have to
         // get that info here and return null if the serialized data wasn't found.
         var node = context.Nodes.Length == 1 ? context.Nodes[0] as AssemblyChildNode : null;
         if (node != null)
         {
             return(new AssemblyChildNodeTabContent(node));
         }
     }
     return(null);
 }
Ejemplo n.º 11
0
        public DocumentTabContent Deserialize(Guid guid, ISettingsSection section, IDocumentTabContentFactoryContext context)
        {
            if (guid != GUID_SerializedContent)
            {
                return(null);
            }
            var hexNode = context.Nodes.Length != 1 ? null : context.Nodes[0] as HexNode;

            if (hexNode == null)
            {
                return(null);
            }

            return(new HexDocumentTabContent(hexNode));
        }
		public DocumentTabContent Create(IDocumentTabContentFactoryContext context) =>
			new DecompileDocumentTabContent(this, context.Nodes, DecompilerService.Decompiler);
		// Called to create a new IFileTabContent. If it's our new tree node, create a new IFileTabContent for it
		public DocumentTabContent Create(IDocumentTabContentFactoryContext context) {
			if (context.Nodes.Length == 1 && context.Nodes[0] is AssemblyChildNode)
				return new AssemblyChildNodeTabContent((AssemblyChildNode)context.Nodes[0]);
			return null;
		}
Ejemplo n.º 14
0
 public IDocumentTabContent Create(IDocumentTabContentFactoryContext context) =>
 new DecompileDocumentTabContent(this, context.Nodes, DecompilerService.Decompiler);
Ejemplo n.º 15
0
 public DocumentTabContent Create(IDocumentTabContentFactoryContext context) => null;
Ejemplo n.º 16
0
		public DocumentTabContent Deserialize(Guid guid, ISettingsSection section, IDocumentTabContentFactoryContext context) {
			if (guid == GUID_SerializedContent)
				return new AboutScreenDocumentTabContent(documentViewerContentFactoryProvider, appWindow, extensionService, aboutContentType);
			return null;
		}
Ejemplo n.º 17
0
		public DocumentTabContent Create(IDocumentTabContentFactoryContext context) => null;