aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/UI/SingleInstance.cs
diff options
context:
space:
mode:
authorLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-09-11 15:37:14 -0400
committerLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-09-11 15:37:14 -0400
commitf1e668bad82ff591ed4135459c4f26ae500a4025 (patch)
tree4857d3c3a0fd110b3a5821fcb143168d40975669 /MediaBrowser.Common/UI/SingleInstance.cs
parent670a53258ef79ee92f578335577df4f768c9d7d4 (diff)
More code cleanups
Diffstat (limited to 'MediaBrowser.Common/UI/SingleInstance.cs')
-rw-r--r--MediaBrowser.Common/UI/SingleInstance.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Common/UI/SingleInstance.cs b/MediaBrowser.Common/UI/SingleInstance.cs
index 2b2b6fb459..3fc85a74ec 100644
--- a/MediaBrowser.Common/UI/SingleInstance.cs
+++ b/MediaBrowser.Common/UI/SingleInstance.cs
@@ -368,7 +368,7 @@ namespace Microsoft.Shell
/// <param name="channelName">Application's IPC channel name.</param>
private static void CreateRemoteService(string channelName)
{
- BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
+ var serverProvider = new BinaryServerFormatterSinkProvider { };
serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
IDictionary props = new Dictionary<string, string>();
@@ -383,7 +383,7 @@ namespace Microsoft.Shell
ChannelServices.RegisterChannel(channel, true);
// Expose the remote service with the REMOTE_SERVICE_NAME
- IPCRemoteService remoteService = new IPCRemoteService();
+ var remoteService = new IPCRemoteService();
RemotingServices.Marshal(remoteService, RemoteServiceName);
}
@@ -398,13 +398,13 @@ namespace Microsoft.Shell
/// </param>
private static void SignalFirstInstance(string channelName, IList<string> args)
{
- IpcClientChannel secondInstanceChannel = new IpcClientChannel();
+ var secondInstanceChannel = new IpcClientChannel();
ChannelServices.RegisterChannel(secondInstanceChannel, true);
string remotingServiceUrl = IpcProtocol + channelName + "/" + RemoteServiceName;
// Obtain a reference to the remoting service exposed by the server i.e the first instance of the application
- IPCRemoteService firstInstanceRemoteServiceReference = (IPCRemoteService)RemotingServices.Connect(typeof(IPCRemoteService), remotingServiceUrl);
+ var firstInstanceRemoteServiceReference = (IPCRemoteService)RemotingServices.Connect(typeof(IPCRemoteService), remotingServiceUrl);
// Check that the remote service exists, in some cases the first instance may not yet have created one, in which case
// the second instance should just exit
@@ -424,7 +424,7 @@ namespace Microsoft.Shell
private static object ActivateFirstInstanceCallback(object arg)
{
// Get command line args to be passed to first instance
- IList<string> args = arg as IList<string>;
+ var args = arg as IList<string>;
ActivateFirstInstance(args);
return null;
}