public AssemblyFile(ISchemaBase parent, AssemblyFile assemblyFile, Enums.ObjectStatusType status) : base(parent, Enums.ObjectType.AssemblyFile) { this.Name = assemblyFile.Name; this.content = assemblyFile.content; this.Status = status; }
private static void FillFiles(Database database, string connectionString) { if (database.Options.Ignore.FilterAssemblies) { using (SqlConnection conn = new SqlConnection(connectionString)) { using (SqlCommand command = new SqlCommand(GetSQLFiles(), conn)) { conn.Open(); command.CommandTimeout = 0; using (SqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { if (((int)reader["FileId"]) != 1) { Assembly assem = database.Assemblies[reader["Name"].ToString()]; AssemblyFile file = new AssemblyFile(assem,reader["FileName"].ToString(), ToHex((byte[])reader["FileContent"])); assem.Files.Add(file); } } } } } } }