Exemplo n.º 1
0
        private static void Populate(
            Dictionary <GdbWorkspaceIdentity, SimpleSet <GdbTableIdentity> > tablesByWorkspace,
            ICollection <XmlWorkListWorkspace> list)
        {
            foreach (KeyValuePair <GdbWorkspaceIdentity, SimpleSet <GdbTableIdentity> > pair in
                     tablesByWorkspace)
            {
                GdbWorkspaceIdentity         workspace = pair.Key;
                SimpleSet <GdbTableIdentity> tables    = pair.Value;

                var xmlWorkspace = new XmlWorkListWorkspace();
                xmlWorkspace.Path   = workspace.Path;
                xmlWorkspace.Tables = tables
                                      .Select(table => new XmlTableReference(table.Id, table.Name))
                                      .ToList();

                list.Add(xmlWorkspace);
            }
        }