public GetResponseMessage(int requestId, VersionCode version, OctetString community, ErrorCode error, int index, IList<Variable> variables) { if (variables == null) { throw new ArgumentNullException("variables"); } if (community == null) { throw new ArgumentNullException("community"); } if (version == VersionCode.V3) { throw new ArgumentException("Please use overload constructor for v3", "version"); } Version = version; Header = Header.Empty; Parameters = new SecurityParameters(null, null, null, community, null, null); GetResponsePdu pdu = new GetResponsePdu( requestId, error, index, variables); Scope = new Scope(pdu); Privacy = DefaultPrivacyProvider.DefaultPair; _bytes = SnmpMessageExtension.PackMessage(Version, Header, Parameters, Scope, Privacy).ToBytes(); }
public GetResponseMessage(int requestId, VersionCode version, OctetString community, ErrorCode error, int index, IList <Variable> variables) { if (variables == null) { throw new ArgumentNullException("variables"); } if (community == null) { throw new ArgumentNullException("community"); } if (version == VersionCode.V3) { throw new ArgumentException("Please use overload constructor for v3", "version"); } Version = version; Header = Header.Empty; Parameters = new SecurityParameters(null, null, null, community, null, null); GetResponsePdu pdu = new GetResponsePdu( requestId, error, index, variables); Scope = new Scope(pdu); Privacy = DefaultPrivacyProvider.DefaultPair; _bytes = SnmpMessageExtension.PackMessage(Version, Header, Parameters, Scope, Privacy).ToBytes(); }