Exemple #1
0
        public static int GetNamingStoreContents(string[] args)
        {
            var hostEndPoint = args[1]; // e.g. "paralleljobs2-bn-cs.cloudapp.net:19000"

            // e.g. "Fabric:/__FabricSystem_App4294967295" or "Fabric:/__FabricSystem_App4294967295/InfrastructureService" (for multi-tenant store)
            var storeName = args[2];

            var pm       = new FabricClient(new FabricClientSettings(), hostEndPoint).PropertyManager;
            var storeUri = new Uri(storeName);
            PropertyEnumerationResult properties = null; // TODO use this in a loop

            properties = pm.EnumeratePropertiesAsync(storeUri, true, properties).GetAwaiter().GetResult();
            foreach (var property in properties)
            {
                Console.WriteLine("{0}, {1}, {2:o}, {3}", property.Metadata.PropertyName, GetValue(property),
                                  property.Metadata.LastModifiedUtc, property.Metadata.TypeId);
            }

            return(0);
        }