protected override void DeserializeBody(ITypeReader typeReader) { TestList = typeReader.ReadListOfInt(); TestBool = typeReader.ReadBool(); TestInt = typeReader.ReadInt(); TestFloat = typeReader.ReadFloat(); }
public static User Build(ITypeReader reader) { User user = new User(); user.UserId = reader.GetGuid("UserId"); user.AcceptedLatestTOS = reader.GetBool("AcceptedLatestTOS"); user.LastTOSVersion = reader.GetInt("LastTOSVersion"); user.PasswordExpiration = reader.GetDate("PasswordExpiration"); user.FirstTimeUser = reader.GetBool("NewUser"); user.DisplayName = reader.GetString("DisplayName"); user.FirstName = reader.GetString("FirstName"); user.MiddleName = reader.GetString("MiddleName"); user.LastName = reader.GetString("LastName"); user.Phone = reader.GetString("Phone"); user.Ext = reader.GetString("Ext"); user.SessionTimeoutInterval = reader.GetInt("SessionTimeout"); user.PasswordQuestion = reader.GetString("PasswordQuestion"); user.PasswordAnswer = reader.GetString("PasswordAnswer"); user.AdminUserId = reader.GetGuid("AdministratorUserId"); user.AdminUserName = reader.GetString("AdminUserName"); user.UserType = (UserTypes)reader.GetInt("UserTypeId"); user.UserTypeId = reader.GetInt("UserTypeId"); user.FailedPasswordAttemptCount = reader.GetInt("FailedPasswordAttemptCount"); user.FailedPasswordAnswerAttemptCount = reader.GetInt("FailedPasswordAnswerAttemptCount"); user.Status = reader.GetString("Status"); user.StatusTypeId = reader.GetInt("StatusTypeId"); return(user); }
public static T Read <T>(this ITypeReader typeReader) where T : ISerializable, new() { var data = new T(); data.Deserialize(typeReader); return(data); }
protected override void DeserializeRequestBody(ITypeReader typeReader) { RoomId = typeReader.ReadGuid(); CurrentPlayerCount = typeReader.ReadInt(); State = (RoomState)typeReader.ReadByte(); MaxMatchMakingWeight = typeReader.ReadInt(); }
public static EntityDictionary <T> ReadEntityDictionary <T>(this ITypeReader typeReader) where T : EntityBase, new() { var result = new EntityDictionary <T>(); try { var length = typeReader.ReadInt(); if (length != 0) { for (int i = 0; i < length; i++) { var item = new T(); item.Deserialize(typeReader); result.Add(item); } } } catch (Exception e) { throw new Exception($"Error deserializing EntityDictionary<{typeof(T)}>: {e}"); } return(result); }
static bool RegisterType(Type t, ITypeReader reader) { int hash = Utility.GetHash(t.ToString()); ms_TypeInfoList.Add(hash, reader); return(true); }
public static ApplicationSetting Build(ITypeReader reader) { ApplicationSetting applicationSetting = new ApplicationSetting(); applicationSetting.Key = reader.GetString("Key"); applicationSetting.Value = reader.GetString("Value"); return(applicationSetting); }
protected override void DeserializeBody(ITypeReader typeReader) { RoomId = typeReader.ReadGuid(); MaxPlayers = typeReader.ReadInt(); CurrentPlayers = typeReader.ReadInt(); RoomProperties = typeReader.ReadDictionary <byte>(typeReader.ReadByte); State = (RoomState)typeReader.ReadByte(); }
public static PasswordHistory Build(ITypeReader reader) { PasswordHistory PasswordHistory = new PasswordHistory(); PasswordHistory.UserId = reader.GetGuid("UserId"); PasswordHistory.Password = reader.GetString("Password"); return(PasswordHistory); }
public static SecurityQuestion Build(ITypeReader reader) { SecurityQuestion securityQuestion = new SecurityQuestion(); securityQuestion.QuestionId = reader.GetInt("SecurityQuestionId"); securityQuestion.Question = reader.GetString("Question"); return(securityQuestion); }
public static AuditItem Build(ITypeReader reader) { AuditItem _auditItem = new AuditItem(); _auditItem.PatientID = reader.GetInt("PatientId"); return(_auditItem); }
public static Subscriber BuildPQRSsubscriber(ITypeReader reader) { Subscriber subscriber = Build(reader); subscriber.NPI = reader.GetString(Columns.NPI, string.Empty); subscriber.TIN = reader.GetString(Columns.TIN, string.Empty); return(subscriber); }
public static SystemSetting Build(ITypeReader reader) { SystemSetting systemSetting = new SystemSetting(); systemSetting.KeyName = reader.GetString(Columns.KEYNAME); systemSetting.Value = reader.GetString(Columns.VALUE); return(systemSetting); }
public static AttributionType Build(ITypeReader reader) { AttributionType attributionType = new AttributionType(); attributionType.AttributionTypeId = reader.GetInt(Columns.ATTRIBUTIONTYPEID); attributionType.AttributionTypeName = reader.GetString(Columns.ATTRIBUTIONTYPENAME); return(attributionType); }
public static Measure BuildBasic(ITypeReader reader) { Measure measure = new Measure(); measure.MeasureId = reader.GetInt(Columns.MEASUREIDCOLUMN); measure.Name = reader.GetString(Columns.MEASURENAMECOLUMN); return(measure); }
//TODO Need to create list of Groups rather than Id #region Public Methods public static Subscriber Build(ITypeReader reader) { Subscriber subscriber = new Subscriber(); subscriber.SubscriberId = reader.GetInt(Columns.SUBSCRIBERID); subscriber.Name = reader.GetString(Columns.SUBSCRIBERNAME); //subscriber.Status = reader.GetString("Status"); return(subscriber); }
public static TermsOfService Build(ITypeReader reader) { TermsOfService tos = new TermsOfService(); tos.TermsOfServiceID = reader.GetInt("TermsOfServiceID"); tos.TermsOfServiceText = reader.GetString("Text"); tos.Version = reader.GetString("Version"); return(tos); }
protected override void DeserializeRequestBody(ITypeReader typeReader) { ServerIdentity = typeReader.Read <ServerIdentity>(); Name = typeReader.ReadString(); Region = typeReader.ReadString(); PeersCount = typeReader.ReadInt(); HttpPort = typeReader.ReadUShort(); HttpsPort = typeReader.ReadUShort(); }
public static RolePermission Build(ITypeReader reader) { RolePermission rolePermission = new RolePermission(); rolePermission.RoleId = reader.GetGuid("RoleId"); rolePermission.PermissionId = reader.GetInt("PermissionId"); return(rolePermission); }
public static OptOutType Build(ITypeReader reader) { OptOutType ooType = new OptOutType(); ooType.ProtocolId = reader.GetInt("ProtocolId"); ooType.ProtocolName = reader.GetString("ProtocolName"); return(ooType); }
protected override void DeserializeBody(ITypeReader typeReader) { this.ResultCode = (ResultCode)typeReader.ReadByte(); this.Message = typeReader.ReadString(); if (ResultCode == ResultCode.OK) { DeserializeResponseBody(typeReader); } }
public static ControlPermission Build(ITypeReader reader) { ControlPermission controlPermissionDTO = new ControlPermission(); controlPermissionDTO.ControlId = reader.GetInt("ControlId"); controlPermissionDTO.PermissionId = reader.GetInt("PermissionId"); controlPermissionDTO.PermissionTypeId = reader.GetInt("PermissionTypeId"); return(controlPermissionDTO); }
protected override void DeserializeBody(ITypeReader typeReader) { ServerIpAddress = typeReader.ReadString(); ServerPort = typeReader.ReadUShort(); RoomId = typeReader.ReadGuid(); Status = (JoinStatus)typeReader.ReadByte(); CurrentPlayers = typeReader.ReadInt(); MaxPlayers = typeReader.ReadInt(); JoinToExisting = typeReader.ReadBool(); }
public static OrgFunction Build(ITypeReader reader) { var orgFunction = new OrgFunction(); orgFunction.OrgFunctionId = reader.GetInt("OrgFunctionId"); orgFunction.Name = reader.GetString("OrgFunctionName"); orgFunction.Description = reader.GetString("Description", string.Empty); orgFunction.IsDeleted = reader.GetBool("DeleteFlag", false); return(orgFunction); }
public static UserGroup Build(ITypeReader reader) { UserGroup group = new UserGroup(); group.UserId = reader.GetGuid("UserId"); group.GroupId = reader.GetInt("GroupId"); group.Name = reader.GetString("Name"); return(group); }
public void Deserialize(ITypeReader typeReader) { ResultCode = (ResultCode)typeReader.ReadByte(); Message = typeReader.ReadString(); if (ResultCode != ResultCode.OK) { return; } DeserializeResponseBody(typeReader); }
public static ApplicationMessage Build(ITypeReader reader) { ApplicationMessage applicationMessage = new ApplicationMessage(); applicationMessage.Code = reader.GetString("Code"); applicationMessage.Title = reader.GetString("Title"); applicationMessage.Text = reader.GetString("Text"); applicationMessage.Audit = reader.GetBool("Audit"); return(applicationMessage); }
public static Role BuildRoles(ITypeReader reader) { Role role = new Role(); role.RoleId = reader.GetGuid("RoleId"); role.RoleName = reader.GetString("RoleName"); role.LoweredRoleName = reader.GetString("RoleName").ToLower(); return(role); }
public static Group Build(ITypeReader reader) { Group group = new Group(); group.GroupId = reader.GetInt(Columns.GROUPID); group.Name = reader.GetString(Columns.NAME); group.EnableAll = reader.GetBool(Columns.ENABLEALL); group.CreateDate = reader.GetDate(Columns.CREATEDATE); return(group); }
public static Permission Build(ITypeReader reader) { Permission permission = new Permission(); permission.PermissionId = reader.GetInt("PermissionId"); permission.Name = reader.GetString("Name"); permission.Description = reader.GetString("Description"); permission.PermissionTypeId = reader.GetInt("PermissionTypeId"); return(permission); }
public static IAdaptingType readData(FlashorbBinaryReader reader, ParseContext parseContext, ITypeReader[] readers) { int type = reader.ReadByte(); return readers[type].read(reader, parseContext); }
public static void setAMF3Reader(int dataType, ITypeReader reader) { V3READERS[dataType] = reader; }
public Scripter UsingTypeReader(ITypeReader reader) { if (reader == null) throw new ArgumentNullException("reader"); this.Reader = reader; return this; }
public static IAdaptingType readData(int dataType, FlashorbBinaryReader reader, ParseContext parseContext, ITypeReader[] readers) { return readers[dataType].read(reader, parseContext); }
public void Init() { _typeReader = new ArrayTypeReader(); _readerTestUtility = new TypeReaderTestUtility(); }