public NegotiateNewEnviron(EnvironVarCode NameCode, string NameText) { this.NameCode = NameCode; this.NameText = NameText; this.DoSendValue = false; this.ValueText = null; }
public OptionVariable(EnvironVarCode VarCode, string NameText, bool ValueEmpty) : this() { this.VarCode = VarCode; this.NameBytes = Encoding.ASCII.GetBytes(NameText); this.ValueEmpty = ValueEmpty; }
public OptionVariable(EnvironVarCode VarCode, string NameText, byte[] Value) : this() { this.VarCode = VarCode; this.NameBytes = Encoding.ASCII.GetBytes(NameText); this.ValueBytes = Value; }
public OptionVariable(EnvironVarCode VarCode, byte[] NameBytes, byte[] ValueBytes) : this() { this.VarCode = VarCode; this.NameBytes = NameBytes; this.ValueBytes = ValueBytes; ParseNameBytes(this.NameBytes); }
public byte[] ToBytes() { ByteArrayBuilder ab = new ByteArrayBuilder(); ab.Append(this.VarCode.ToByte()); ab.Append(this.NameBytes); if ((this.ValueBytes != null) && (this.ValueBytes.Length > 0)) { EnvironVarCode optnCode = EnvironVarCode.VALUE; ab.Append(optnCode.ToByte()); ab.Append(this.ValueBytes); } else if (this.ValueEmpty == true) { EnvironVarCode optnCode = EnvironVarCode.VALUE; ab.Append(optnCode.ToByte()); } return(ab.ToByteArray()); }
public void AddOptionVar(EnvironVarCode VarCode, string VarName, byte[] VarValue) { var ov = new OptionVariable(VarCode, VarName, VarValue); this.OptionList.Add(ov); }
public BuildOptionVariable(EnvironVarCode NameCode, string NameText) { this.NameCode = NameCode; this.NameText = NameText; }
public static byte ToByte(this EnvironVarCode OptionCode) { byte b1 = (byte)OptionCode; return(b1); }