PowerSNMP for .NET CF
Create Method
See Also  Send comments on this topic.
Dart.Snmp Namespace > MessageBase Class : Create Method




source
A Segment containing the source (encoded) SNMP message. Version 1/2/3 is supported.
origin
An IPEndPoint indicating the source of the message. Used to initialize MessageBase.Origin. Can be null.
users
A Dictionary containing Username strings as keys and Passwords objects as values. Used to authenticate and decrypt SNMP3 messages. Can be null.
mib
A MibNodes object that defines the MIB.
Initializes an instance of a class derived from MessageBase using the provided buffer.

Syntax

Visual Basic (Declaration) 
Public Shared Function Create( _
   ByVal source As Segment, _
   ByVal origin As IPEndPoint, _
   ByVal users As Dictionary(Of String,Passwords), _
   ByVal mib As MibNodes _
) As MessageBase
Visual Basic (Usage)Copy Code
Dim source As Segment
Dim origin As IPEndPoint
Dim users As Dictionary(Of String,Passwords)
Dim mib As MibNodes
Dim value As MessageBase
 
value = MessageBase.Create(source, origin, users, mib)
C# 
public static MessageBase Create( 
   Segment source,
   IPEndPoint origin,
   Dictionary<string,Passwords> users,
   MibNodes mib
)
Managed Extensions for C++ 
public: static MessageBase* Create( 
   Segment* source,
   IPEndPoint* origin,
   Dictionary<string*,Passwords*>* users,
   MibNodes* mib
) 
C++/CLI 
public:
static MessageBase^ Create( 
   Segment^ source,
   IPEndPoint^ origin,
   Dictionary<String^,Passwords^>^ users,
   MibNodes^ mib
) 

Parameters

source
A Segment containing the source (encoded) SNMP message. Version 1/2/3 is supported.
origin
An IPEndPoint indicating the source of the message. Used to initialize MessageBase.Origin. Can be null.
users
A Dictionary containing Username strings as keys and Passwords objects as values. Used to authenticate and decrypt SNMP3 messages. Can be null.
mib
A MibNodes object that defines the MIB.

Return Value

A newly created message.

Exceptions

ExceptionDescription
Dart.Snmp.DecodingExceptionA decoding problem was experienced.
Dart.Snmp.SecurityExceptionA security related problem was experienced while decoding the message. Thrown if a password is required and not present in the cache and passwordDelegate is null.

Remarks

The returned MessageBase object will normally be cast to the appropriate type before being used.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.