public IDocumentSpec getSchemaSpec(Type schemaType) { if (schemaType == null) { throw new ArgumentNullException("schemaType"); } if (!schemaType.IsSubclassOf(typeof(SchemaBase))) { throw new ArgumentException("Type does not represent a schema", "schemaType"); } string typename = schemaType.FullName; string assemblyName = schemaType.Assembly.FullName; var docSpec = new DocumentSpec(typename, assemblyName); return(docSpec); }
//Load Document specification public IDocumentSpec LoadDocSpec(Type schemaType) { try { if (schemaType == null) throw new ArgumentNullException("schemaType"); if (!schemaType.IsSubclassOf(typeof(SchemaBase))) throw new ArgumentException("Type does not represent a schema", "schemaType"); string typename = schemaType.FullName; string assemblyName = schemaType.Assembly.FullName; DocumentSpec docSpec = new DocumentSpec(typename, assemblyName); return docSpec; } catch (Exception ex) { LogEngine.DirectEventViewerLog($"Error in pipeline component during load specs for assembly {schemaType.Assembly.FullName} check system GAC.",1); return null; } }