Ejemplo n.º 1
0
		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);
			}
		}
Ejemplo n.º 2
0
		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);
		}