public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Source = objBinaryReader.ReadString(); Log = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Enabled = objBinaryReader.ReadBoolean(); MessageTypes = objBinaryReader.ReadTransportableObject <MessageTypeCollection>(); }
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); SmtpClient = objBinaryReader.ReadTransportableObject <SmtpClient>(); DefaulMailMessage = objBinaryReader.ReadTransportableObject <MailMessage>(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Details = objBinaryReader.ReadString(); Exception = (Exception)objBinaryReader.ReadObject(); }
public ObjectBase(BinaryReaderExtension objBinaryReader) : this() { BeginInit(); ReadData(objBinaryReader); EndInit(); }
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); Message = objBinaryReader.ReadString(); Category = objBinaryReader.ReadString(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Binding = objBinaryReader.ReadTransportableObject <IWcfBinding>(); EndpointAddress = objBinaryReader.ReadTransportableObject <WcfEndpointAddress>(); Priority = objBinaryReader.ReadInt32(); }
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); Enabled = objBinaryReader.ReadBoolean(); InactivityTimeout = objBinaryReader.ReadTimeSpan(); Ordered = objBinaryReader.ReadBoolean(); }
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); MaxConcurrentCalls = objBinaryReader.ReadInt32(); MaxConcurrentInstances = objBinaryReader.ReadInt32(); MaxConcurrentSessions = objBinaryReader.ReadInt32(); }
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(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); Job = objBinaryReader.ReadTransportableObject <Job>(); StartTime = objBinaryReader.ReadDateTime(); EndTime = objBinaryReader.ReadDateTime(); Result = (JobResultType)objBinaryReader.ReadByte(); TaskResults = objBinaryReader.ReadTransportableObject <TaskResultList>(); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); MaxArrayLength = objBinaryReader.ReadInt32(); MaxBytesPerRead = objBinaryReader.ReadInt32(); MaxDepth = objBinaryReader.ReadInt32(); MaxNameTableCharCount = objBinaryReader.ReadInt32(); MaxStringContentLength = 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 Layer readImpl(string filename) { // split filename in path and filename string[] split = filename.Split('\\'); string name = split.Last(); // remove extension name = name.Substring(0, name.Length - 4); string path = filename.Substring(0, filename.Length - name.Length - 4); layer = new Layer(name); // read .prj-file with same name or with name 'default.prj' string prjName = filename.Substring(0, filename.Length - 3) + "prj"; if (File.Exists(prjName)) layer.Projection = PrjReader.read(prjName); else if (File.Exists(path + "default.prj")) layer.Projection = PrjReader.read(path + "default.prj"); else { // warning message if missing prj file string msg = "No projection da found. Assuming " + SGIS.App.getSrsName(); MessageBox.Show(msg, "Missing spatial reference system: " + name, MessageBoxButtons.OK, MessageBoxIcon.Warning); } // try reading attribute file with same name string dbfName = filename.Substring(0, filename.Length - 3) + "dbf"; if (File.Exists(dbfName)) layer.DataTable = DbfReader.read(dbfName); // create stream from file FileStream f = File.Open(filename, FileMode.Open); br = new BinaryReaderExtension(f); pos = 0; length = (int)br.BaseStream.Length; readHeader(); // set bounding box from values in header layer.Boundingbox = new Envelope(minx, maxx, miny, maxy); layer.createQuadTree(); // content starts at pos 100 pos = 100; // read all shapes until end while (pos < length) readShape(); br.Close(); // features now converted to application srs layer.Projection = SGIS.App.SRS; return layer; }