Esempio n. 1
0
        internal ICSConnection(INetSharingManager nsManager, INetConnection netConnection)
        {
            if (nsManager == null)
            {
                throw new ArgumentNullException("nsManager");
            }

            if (netConnection == null)
            {
                throw new ArgumentNullException("netConnection");
            }

            this._netConnectionProperties = nsManager.NetConnectionProps[netConnection];
            this._netSharingConfiguration = nsManager.INetSharingConfigurationForINetConnection[netConnection];
        }
Esempio n. 2
0
        internal ICSConnection(INetSharingManager nsManager, INetConnection netConnection)
        {
            if (nsManager == null)
            {
                throw new ArgumentNullException("nsManager");
            }

            if (netConnection == null)
            {
                throw new ArgumentNullException("netConnection");
            }

            this._netConnectionProperties = nsManager.NetConnectionProps[netConnection];
            this._netSharingConfiguration = nsManager.INetSharingConfigurationForINetConnection[netConnection];
        }
Esempio n. 3
0
        internal ICSManager()
        {
            _netSharingManager = new NetSharingManager();

            if (!_netSharingManager.SharingInstalled)
            {
                string message;
                message = Environment.OSVersion.Version.Major == 5
                    ? "The operating system doesn't support connection sharing"
                    : "ICS requires elevated privilege";
                Logger.Error(".ctor: {0}", message);
                throw new ICSException(message);
            }

            _icsService = new ServiceController("SharedAccess");
        }
Esempio n. 4
0
        internal ICSManager()
        {
            _netSharingManager = new NetSharingManager();

            if (!_netSharingManager.SharingInstalled)
            {
                string message;
                message = Environment.OSVersion.Version.Major == 5
                    ? "The operating system doesn't support connection sharing"
                    : "ICS requires elevated privilege";
                Logger.Error(".ctor: {0}", message);
                throw new ICSException(message);
            }

            _icsService = new ServiceController("SharedAccess");
        }
Esempio n. 5
0
 public IcsConnection(INetSharingManager pIcsMgr, INetConnection pNetConnection)
 {
     this.INetConnection = pNetConnection;
     this._NSManager = pIcsMgr;
 }
Esempio n. 6
0
 public IcsConnection(INetSharingManager pIcsMgr, INetConnection pNetConnection)
 {
     this.INetConnection = pNetConnection;
     this._NSManager     = pIcsMgr;
 }
Esempio n. 7
0
 public void Init()
 {
     this._NSManager = new NetSharingManagerClass();
 }
Esempio n. 8
0
 public void Init()
 {
     this._NSManager = new NetSharingManagerClass();
 }
Esempio n. 9
0
 public void Init()
 {
     _NSManager = new NetSharingManager();
 }