public SchemaLoader(IGameEngineProxy gameEngine) { m_gameEngine = gameEngine; // set resolver to locate embedded .xsd file SchemaResolver = new ResourceStreamResolver(Assembly.GetExecutingAssembly(), "LevelEditor.schemas"); Load("level_editor.xsd"); }
public ResourceListerCommandClient(IGameEngineProxy engineInfo) { if (engineInfo != null) { var modelType = engineInfo.Info.ResourceInfos.GetByType("Model"); _modelFileExtensions = (modelType != null) ? modelType.FileExts : null; var bookmarkType = engineInfo.Info.ResourceInfos.GetByType("ModelBookmark"); _modelBookmarkExtensions = (bookmarkType != null) ? bookmarkType.FileExts : null; } _modelFileExtensions = _modelFileExtensions ?? System.Linq.Enumerable.Empty <string>(); _modelBookmarkExtensions = _modelBookmarkExtensions ?? System.Linq.Enumerable.Empty <string>(); }
public ResourcePreview(IGameEngineProxy engineInfo) { if (engineInfo != null) { var modelType = engineInfo.Info.ResourceInfos.GetByType("Model"); if (modelType != null) { _fileExtensions = modelType.FileExts; } } if (_fileExtensions == null) { _fileExtensions = System.Linq.Enumerable.Empty <string>(); } }
public SchemaLoader(IGameEngineProxy gameEngine) { m_gameEngine = gameEngine; var resolver = new MultiAssemblyResolver(); var schemaSet = new XmlSchemaSet { XmlResolver = resolver }; PrepareSchemaResource(schemaSet, resolver, Assembly.GetExecutingAssembly(), "LevelEditor.schemas", "level_editor.xsd"); var xleSchema = LevelEditorXLE.Patches.GetSchemaResourceName(); PrepareSchemaResource(schemaSet, resolver, Assembly.GetAssembly(typeof(LevelEditorXLE.Patches)), xleSchema.Item1, xleSchema.Item2); Load(schemaSet); }