123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace HPSocketCS.Extended
- {
-
-
-
- [Serializable]
- public class RequestData
- {
- public RequestData() {
-
- }
- public RequestData(int rCommand)
- {
- this._RequestCommand = rCommand;
- }
- private Int32 _RequestCommand;
-
-
-
- public Int32 RequestCommand
- {
- get { return _RequestCommand; }
- set { _RequestCommand = value; }
- }
- byte[] _AttachedData = null;
-
-
-
- public byte[] AttachedData
- {
- get { return _AttachedData; }
- set { _AttachedData = value; }
- }
- string _AttachedMessage = "";
-
-
-
- public string AttachedMessage
- {
- get { return _AttachedMessage; }
- set { _AttachedMessage = value; }
- }
-
-
-
-
-
- public T AttachedDataToObject<T>()
- {
- try
- {
- return (T)HPSocketCS.Extended.DataSetSerializerDeserialize.ObjectDeserialize(this._AttachedData);
- }
- catch
- {
- return default(T);
- }
- }
- }
- }
|