/// <summary>
 /// Constructor.
 /// </summary>
 /// <exception cref="System.ArgumentNullException">the context must not be null.</exception>
 /// <exception cref="System.ArgumentNullException">the config must not be null.</exception>
 public CifsClientDecodePacket(CifsClientContext context, CifsClientConfig config)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (config == null)
     {
         throw new ArgumentNullException("config");
     }
     this.clientContext          = context;
     this.clientConfig           = config;
     this.isContextUpdateEnabled = true;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <exception cref="System.ArgumentNullException">the context must not be null.</exception>
 /// <exception cref="System.ArgumentNullException">the config must not be null.</exception>
 public CifsClientDecodePacket(CifsClientContext context, CifsClientConfig config)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (config == null)
     {
         throw new ArgumentNullException("config");
     }
     this.clientContext = context;
     this.clientConfig = config;
     this.isContextUpdateEnabled = true;
 }
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="clientConfig">the config for CIFS client. It MUST NOT be null.</param>
        /// <exception cref="System.ArgumentNullException">the clientConfig is null.</exception>
        public CifsClient(CifsClientConfig clientConfig)
        {
            if (clientConfig == null)
            {
                throw new ArgumentNullException("clientConfig");
            }

            this.ptfConfig = clientConfig;
            this.context = new CifsClientContext();
            this.decoder = new CifsClientDecodePacket(this.Context, clientConfig);
            this.connectionId = InvalidConnectionId;
            this.defaultParameters.Flag = InitializedDefaultFlag;
            this.defaultParameters.Flag2 = InitializedDefaultFlag2;
            this.defaultParameters.TransSmbParametersFlags = InitializedDefaultTransSmbParametersFlags;
            this.defaultParameters.Trans2SmbParametersFlags = InitializedDefaultTrans2SmbParametersFlags;
            this.defaultParameters.Timeout = InitializedDefaultTimeout;
            this.defaultParameters.MaxSetupCount = InitializedDefaultMaxSetupCount;
            this.defaultParameters.MaxParameterCount = InitializedDefaultMaxParameterCount;
            this.defaultParameters.MaxDataCount = InitializedDefaultMaxDataCount;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 public CifsClientTransport(CifsClientConfig config)
 {
     this.config     = config;
     this.cifsClient = new CifsClient(this.config);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructor
 /// </summary>
 public CifsClientTransport()
     : base()
 {
     this.config     = new CifsClientConfig();
     this.cifsClient = new CifsClient(this.config);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public CifsClientTransport(CifsClientConfig config)
 {
     this.config = config;
     this.cifsClient = new CifsClient(this.config);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public CifsClientTransport()
     : base()
 {
     this.config = new CifsClientConfig();
     this.cifsClient = new CifsClient(this.config);
 }