Ejemplo 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];
        }
Ejemplo 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];
        }
Ejemplo 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");
        }
Ejemplo 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");
        }
Ejemplo n.º 5
0
 public IcsConnection(INetSharingManager pIcsMgr, INetConnection pNetConnection)
 {
     this.INetConnection = pNetConnection;
     this._NSManager = pIcsMgr;
 }
Ejemplo n.º 6
0
 public IcsConnection(INetSharingManager pIcsMgr, INetConnection pNetConnection)
 {
     this.INetConnection = pNetConnection;
     this._NSManager     = pIcsMgr;
 }
Ejemplo n.º 7
0
 public void Init()
 {
     this._NSManager = new NetSharingManagerClass();
 }
Ejemplo n.º 8
0
 public void Init()
 {
     this._NSManager = new NetSharingManagerClass();
 }
Ejemplo n.º 9
0
 public void Init()
 {
     _NSManager = new NetSharingManager();
 }