/// <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; }
/// <summary> /// set the context. /// </summary> /// <param name="clientContext">the new context</param> protected internal void SetContext(CifsClientContext clientContext) { this.context = clientContext; }