public void Start(CancellationToken token)
 {
     InstanceId     = GetInstanceId(GraphEngineStatefulServiceRuntime.Instance.Context.ReplicaId, GraphEngineStatefulServiceRuntime.Instance.PartitionId);
     m_token        = token;
     m_fclient      = new System.Fabric.FabricClient();
     m_partitionIds = GraphEngineStatefulServiceRuntime.Instance.Partitions.Select(_ => _.PartitionInformation.Id).ToList();
 }
        public static async Task <Uri> DiscoverBrokerServiceNameAsync(Uri applicationName)
        {
            try
            {
                var fc       = new System.Fabric.FabricClient();
                var property = await fc.PropertyManager.GetPropertyAsync(applicationName, nameof(BrokerService));

                if (property == null)
                {
                    return(null);
                }
                string value = property.GetValue <string>();
                return(new Uri(value));
            }
            catch
            {
            }
            return(null);
        }
 public void Start(CancellationToken cancellationToken)
 {
     m_token   = cancellationToken;
     m_fclient = new System.Fabric.FabricClient();
 }