Microsoft.Protocols.TestSuites.Common.RopDeserializer.Register C# (CSharp) Method

Register() public static method

Register a ROP's Id together with a Deserializer
public static Register ( int ropId, IDeserializable iropDeserializer ) : void
ropId int The ROP's Id
iropDeserializer IDeserializable The interface define the methods that is needed to deserialize a bytes array into an ROP object
return void
        public static void Register(int ropId, IDeserializable iropDeserializer)
        {
            maps[ropId] = iropDeserializer;
        }

Usage Example

Example #1
0
 /// <summary>
 /// Register other ROPs' deserializer
 /// </summary>
 private void RegisterOtherROPDeserializer()
 {
     #region Other ROPs response register
     RopDeserializer.Register(Convert.ToInt32(RopId.RopBackoff), new RopBackoffResponse());
     RopDeserializer.Register(Convert.ToInt32(RopId.RopBufferTooSmall), new RopBufferTooSmallResponse());
     #endregion
 }
All Usage Examples Of Microsoft.Protocols.TestSuites.Common.RopDeserializer::Register