/// <summary>
        ///  FabricTransportSettings returns the default Settings .Loads the configuration file from default Config Package"Config" , if not found then try to load from  default config file "ClientExeName.Settings.xml"  from Client Exe directory.
        /// </summary>
        /// <param name="sectionName">Name of the section within the configuration file. If not found section in configuration file, it will return the default Settings</param>
        /// <returns></returns>
        private static FabricTransportRemotingSettings GetDefaultFabricTransportSettings(string sectionName = "TransportSettings")
        {
            var settings = (FabricTransportRemotingSettings)null;

            if (!FabricTransportRemotingSettings.TryLoadFrom(sectionName, out settings, (string)null, (string)null))
            {
                settings = new FabricTransportRemotingSettings();
            }
            return(settings);
        }
        private static ServiceProxyFactory CreateFactory()
        {
            if (!FabricTransportRemotingSettings.TryLoadFrom(
                    "TransportSettings",
                    out FabricTransportRemotingSettings transportSettings))
            {
                transportSettings = new FabricTransportRemotingSettings();
            }

            return(new ServiceProxyFactory(
                       handler => new ActivityServiceRemotingClientFactory(
                           new FabricTransportServiceRemotingClientFactory(transportSettings, handler))));
        }