Exemple #1
0
        internal static DataTable GetTable(string xamlName, Service profile, Dictionary <string, List <string> > rbacMetaData)
        {
            DataTable dataTable;

            if (!DDIVUtil.dataTables.TryGetValue(xamlName, out dataTable))
            {
                dataTable = new DataTable();
                IList <Variable> variables = profile.Variables;
                foreach (Variable profile2 in variables)
                {
                    dataTable.Columns.Add(AutomatedDataHandlerBase.CreateColumn(profile2, rbacMetaData, DDIVUtil.GetStore(xamlName, profile)));
                }
                DDIVUtil.dataTables[xamlName] = dataTable;
            }
            return(dataTable);
        }
Exemple #2
0
        protected void CreateColumn(DataTable table, Dictionary <string, List <string> > rbacMetaData)
        {
            IList <Variable> variables = this.profileBuilder.Variables;

            foreach (Variable profile in variables)
            {
                table.Columns.Add(AutomatedDataHandlerBase.CreateColumn(profile, rbacMetaData, this.dataObjectStore));
            }
            if ((from c in variables
                 where string.Equals("IsReadOnly", c.Name, StringComparison.OrdinalIgnoreCase)
                 select c).Count <Variable>() == 0)
            {
                table.Columns.Add(AutomatedDataHandlerBase.CreateColumn(new Variable
                {
                    Name = "IsReadOnly",
                    Type = typeof(bool)
                }, rbacMetaData, this.dataObjectStore));
            }
        }