private static TTransportableObjectType Expand <TTransportableObjectType>(Stream objStream) where TTransportableObjectType : TransportableObject { if (objStream == null) { throw new ArgumentNullException("objStream", "A valid non-null Stream is required."); } TTransportableObjectType objTransportableObject = default(TTransportableObjectType); using (BinaryReaderExtension objBinaryReader = new BinaryReaderExtension(objStream)) { byte[] bytSignature = objBinaryReader.ReadBytes(RemotableSignature.Length); if (AreByteArraysEqual(bytSignature, RemotableSignature) == false) { throw new Exception("The binary data does not represent a valid, serialized ITransportableObject instance."); } string strAssemblyName = objBinaryReader.ReadString(); string strTypeName = objBinaryReader.ReadString(); objTransportableObject = FastReflectionManager.CreateInstance <TTransportableObjectType>(typeof(TTransportableObjectType), new Type[] { typeof(BinaryReaderExtension) }, objBinaryReader); } return(objTransportableObject); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Source = objBinaryReader.ReadString(); Log = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Message = objBinaryReader.ReadString(); Category = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Port = objBinaryReader.ReadInt32(); ChannelName = objBinaryReader.ReadString(); MachineName = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); CreatedDate = objBinaryReader.ReadDateTime(); MachineName = objBinaryReader.ReadString(); WindowsId = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Name = objBinaryReader.ReadString(); FullName = objBinaryReader.ReadString(); Enabled = objBinaryReader.ReadBoolean(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); SqlStatement = objBinaryReader.ReadString(); SqlParameters = objBinaryReader.ReadString(); ConnectionString = objBinaryReader.ReadEncryptedString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Path = objBinaryReader.ReadString(); DisplayName = objBinaryReader.ReadString(); Size = objBinaryReader.ReadInt64(); ModifiedDate = objBinaryReader.ReadDateTime(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Source = objBinaryReader.ReadString(); Destination = objBinaryReader.ReadString(); Credentials = objBinaryReader.ReadTransportableObject <Credentials>(); TimeOut = objBinaryReader.ReadInt32(); }
private static ITransportableObject Expand(Stream objStream) { if (objStream == null) { throw new ArgumentNullException("objStream", "A valid non-null Stream is required."); } ITransportableObject objTransportableObject = null; using (BinaryReaderExtension objBinaryReader = new BinaryReaderExtension(objStream)) { byte[] bytSignature = objBinaryReader.ReadBytes(RemotableSignature.Length); if (AreByteArraysEqual(bytSignature, RemotableSignature) == false) { throw new Exception("The binary data does not represent a valid, serialized ITransportableObject instance."); } string strAssemblyName = objBinaryReader.ReadString(); string strTypeName = objBinaryReader.ReadString(); Assembly objAssembly = null; try { objAssembly = Assembly.Load(strAssemblyName); } catch (Exception objException) { string strErrorMessage = "An error was encountered while loading the assembly - Assembly.Load('" + strAssemblyName + "'):\n"; throw new Exception(strErrorMessage, objException); } Type objType = null; try { objType = objAssembly.GetType(strTypeName, true, true); } catch (Exception objException) { string strErrorMessage = "An error was encountered while loading the type - objAssemblyName.GetType('" + strTypeName + "', True, True):\n"; throw new Exception(strErrorMessage, objException); } try { objTransportableObject = FastReflectionManager.CreateInstance <ITransportableObject>(objType, new Type[] { typeof(BinaryReaderExtension) }, objBinaryReader); } catch (Exception objException) { string strErrorMessage = "An error was encountered while creating the object - Activator.CreateInstance('" + objType.FullName + "'):\n"; throw new Exception(strErrorMessage, objException); } } return(objTransportableObject); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); From = objBinaryReader.ReadString(); Subject = objBinaryReader.ReadString(); IsBodyHtml = objBinaryReader.ReadBoolean(); Body = objBinaryReader.ReadString(); DeliveryNotificationOptions = (NetMail.DeliveryNotificationOptions)objBinaryReader.ReadByte(); To = objBinaryReader.ReadTransportableObject <ListBase <string> >(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); string strType = objBinaryReader.ReadString(); Type = System.Type.GetType(strType); Binding = objBinaryReader.ReadTransportableObject <IWcfBinding>(); Address = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); FileName = objBinaryReader.ReadString(); Directory = objBinaryReader.ReadString(); _objSyncObject = null; _objFileStream = null; _objTextWriter = null; }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Guid = objBinaryReader.ReadGuid(); UserName = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Url = objBinaryReader.ReadString(); Credentials = objBinaryReader.ReadTransportableObject <Credentials>(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Details = objBinaryReader.ReadString(); Exception = (Exception)objBinaryReader.ReadObject(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); _strName = objBinaryReader.ReadString(); _enuStatus = (JobStatusType)objBinaryReader.ReadByte(); _objTasks = objBinaryReader.ReadTransportableObject <ITaskList>(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); ApplicationManager.Logs = objBinaryReader.ReadTransportableObject <LogManager>(); ApplicationManager.Settings = objBinaryReader.ReadTransportableObject <SettingsManager>(); ApplicationManager.FilePath = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); PerformanceCounters = objBinaryReader.ReadString(); ConcurrencyMode = objBinaryReader.ReadEnum <ConcurrencyMode>(); InstanceContextMode = objBinaryReader.ReadEnum <InstanceContextMode>(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); UploadRequest = objBinaryReader.ReadTransportableObject <UploadRequest>(); Result = (TaskResultType)objBinaryReader.ReadByte(); UploadStats = objBinaryReader.ReadTransportableObject <UploadStats>(); Details = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Enabled = objBinaryReader.ReadBoolean(); Address = objBinaryReader.ReadString(); Port = objBinaryReader.ReadInt32(); Credentials = objBinaryReader.ReadTransportableObject <Credentials>(); BypassProxyOnLocal = objBinaryReader.ReadBoolean(); UseDefaultCredentials = objBinaryReader.ReadBoolean(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Host = objBinaryReader.ReadString(); Port = objBinaryReader.ReadInt32(); EnableSsl = objBinaryReader.ReadBoolean(); TimeOut = objBinaryReader.ReadInt32(); DeliveryMethod = (NetMail.SmtpDeliveryMethod)objBinaryReader.ReadByte(); UseDefaultCredentials = objBinaryReader.ReadBoolean(); Credentials = objBinaryReader.ReadTransportableObject <Credentials>(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Hash = objBinaryReader.ReadString(); Name = objBinaryReader.ReadString(); Description = objBinaryReader.ReadString(); ProductId = objBinaryReader.ReadString(); ProcessorId = objBinaryReader.ReadString(); SerialNumber = objBinaryReader.ReadString(); ArchitectureType = (ComputerProcessorArchitectureType)objBinaryReader.ReadByte(); VersionString = objBinaryReader.ReadString(); ServicePack = objBinaryReader.ReadString(); Version = objBinaryReader.ReadTransportableObject <VersionToken>(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); int intCount = objBinaryReader.ReadInt32(); for (int intIndex = 0; intIndex < intCount; intIndex++) { string strKey = objBinaryReader.ReadString(); object objValue = objBinaryReader.ReadObject(); Settings.Add(strKey, objValue); } }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Behavior = objBinaryReader.ReadTransportableObject <WcfServiceBehavior>(); Throttling = objBinaryReader.ReadTransportableObject <WcfServiceThrottling>(); string strType = objBinaryReader.ReadString(); Type = System.Type.GetType(strType); BaseAddresses = objBinaryReader.ReadTransportableObject <ListBase <string> >(); ServiceEndpoints = objBinaryReader.ReadTransportableObject <WcfServiceEndpointList>(); MetadataEndpoint = objBinaryReader.ReadTransportableObject <WcfMetadataEndpoint>(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Address = objBinaryReader.ReadString(); }