コード例 #1
0
ファイル: PSSchemaBuilder.cs プロジェクト: modulexcite/pash-1
        internal void Build(Microsoft.Management.Odata.Schema.Schema logicalSchema, Microsoft.Management.Odata.Schema.Schema userSchema, Runspace runspace)
        {
            HashSet <string> strs = null;
            Dictionary <string, CommandInfo> strs1 = null;

            PSSchemaBuilder.GetCommands(runspace, out strs, out strs1);
            List <PSSchemaBuilder.EntityDataForSchemaBuilding> entityDataForSchemaBuildings = this.CreateEntityDataForSchemaBuilding(logicalSchema, strs);

            this.AddEntitiesToSchema(logicalSchema, userSchema, entityDataForSchemaBuildings, strs1);
            userSchema.PopulateAllRelevantResourceTypes(logicalSchema);
        }
コード例 #2
0
ファイル: GISchemaBuilder.cs プロジェクト: modulexcite/pash-1
        public void Build(Microsoft.Management.Odata.Schema.Schema logicalSchema, Microsoft.Management.Odata.Schema.Schema userSchema, UserContext userContext, string membershipId)
        {
            ResourceSet resourceSet = null;

            if (logicalSchema.ResourceSets.TryGetValue("CommandInvocations", out resourceSet))
            {
                string str = "PowerShell.CommandInvocation";
                userSchema.AddEntity(str, true, logicalSchema);
                userSchema.EntityMetadataDictionary.Add(str, logicalSchema.EntityMetadataDictionary[str]);
                userSchema.PopulateAllRelevantResourceTypes(logicalSchema);
            }
        }