Skip to content

Commit

Permalink
Added the missing Messenger.SetAsync method. Bumped the version.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Oct 6, 2016
1 parent 7d01885 commit 139ae0f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .nuget/Lextm.SharpSnmpLib.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<version>9.0.2</version>
<version>9.0.3</version>
<authors>Malcolm Crowe,Lex Li,and other contributors.</authors>
<owners>Lex Li</owners>
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
Expand Down
15 changes: 8 additions & 7 deletions SharpSnmpLib/Messaging/Messenger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public static class Messenger
private static readonly ObjectIdentifier IdUnknownEngineID = new ObjectIdentifier(new uint[] { 1, 3, 6, 1, 6, 3, 15, 1, 1, 4, 0 });
private static readonly ObjectIdentifier IdAuthenticationFailure = new ObjectIdentifier(new uint[] { 1, 3, 6, 1, 6, 3, 15, 1, 1, 5, 0 });
private static readonly ObjectIdentifier IdDecryptionError = new ObjectIdentifier(new uint[] { 1, 3, 6, 1, 6, 3, 15, 1, 1, 6, 0 });
private static int _maxMessageSize = Header.MaxMessageSize;

#region async methods

Expand Down Expand Up @@ -108,6 +107,12 @@ public static async Task<IList<Variable>> GetAsync(VersionCode version, IPEndPoi
return pdu.Variables;
}

[Obsolete("Please use SetAsync instead.")]
public static async Task<IList<Variable>> Set(VersionCode version, IPEndPoint endpoint, OctetString community, IList<Variable> variables)
{
throw new InvalidOperationException("Obsolete method");
}

/// <summary>
/// Sets a list of variable binds.
/// </summary>
Expand All @@ -116,7 +121,7 @@ public static async Task<IList<Variable>> GetAsync(VersionCode version, IPEndPoi
/// <param name="community">Community name.</param>
/// <param name="variables">Variable binds.</param>
/// <returns></returns>
public static async Task<IList<Variable>> Set(VersionCode version, IPEndPoint endpoint, OctetString community, IList<Variable> variables)
public static async Task<IList<Variable>> SetAsync(VersionCode version, IPEndPoint endpoint, OctetString community, IList<Variable> variables)
{
if (endpoint == null)
{
Expand Down Expand Up @@ -1016,11 +1021,7 @@ public static int NextMessageId
/// You can use any value for your own application.
/// Also this value may be changed in #SNMP in future releases.
/// </remarks>
public static int MaxMessageSize
{
get { return _maxMessageSize; }
set { _maxMessageSize = value; }
}
public static int MaxMessageSize { get; set; } = Header.MaxMessageSize;

/// <summary>
/// Returns a new discovery request.
Expand Down
4 changes: 2 additions & 2 deletions SharpSnmpLib/Microsoft.VersionNumber.targets
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<AssemblyRevision>
</AssemblyRevision>
<AssemblyBuildNumberType>DateString</AssemblyBuildNumberType>
<AssemblyBuildNumberFormat>02MMdd</AssemblyBuildNumberFormat>
<AssemblyBuildNumberFormat>03MMdd</AssemblyBuildNumberFormat>
<AssemblyRevisionType>AutoIncrement</AssemblyRevisionType>
<AssemblyRevisionFormat>00</AssemblyRevisionFormat>
</PropertyGroup>
Expand All @@ -28,7 +28,7 @@
<AssemblyFileRevision>
</AssemblyFileRevision>
<AssemblyFileBuildNumberType>DateString</AssemblyFileBuildNumberType>
<AssemblyFileBuildNumberFormat>02MMdd</AssemblyFileBuildNumberFormat>
<AssemblyFileBuildNumberFormat>03MMdd</AssemblyFileBuildNumberFormat>
<AssemblyFileRevisionType>AutoIncrement</AssemblyFileRevisionType>
<AssemblyFileRevisionFormat>00</AssemblyFileRevisionFormat>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions lib/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:

[assembly: AssemblyVersion("9.0.020811.01")]
[assembly: AssemblyVersion("9.0.031006.01")]
#if (!CF)
[assembly: AssemblyFileVersion("9.0.020811.01")]
[assembly: AssemblyFileVersion("9.0.031006.01")]
#endif
4 changes: 2 additions & 2 deletions lib/SharedAssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Imports System.Reflection
' You can specify all values by your own or you can build default build and revision
' numbers with the '*' character (the default):

<Assembly: AssemblyVersion("9.0.020811.01")>
<Assembly: AssemblyFileVersion("9.0.020811.01")>
<Assembly: AssemblyVersion("9.0.031006.01")>
<Assembly: AssemblyFileVersion("9.0.031006.01")>

0 comments on commit 139ae0f

Please sign in to comment.