internal Message( BasicHeader basicHeader, ApplicationHeader applicationHeader, UserHeader userHeader, TextBlock text, Trailer trailer) { if (basicHeader == null) { throw new ParserException("The Basic Header Block is mandatory."); } this.BasicHeader = basicHeader; this.ApplicationHeader = applicationHeader; this.UserHeader = userHeader; this.Text = text; this.Trailer = trailer; }
public BasicOutputTypeOfArrayOfApplicationType ListAppRegistration(ApplicationHeader applicationHeader) { return(applicationsHandler.ListAppRegistrations(applicationHeader)); }
public BasicOutputTypeOfBoolean ApproveAppRegistration(ApplicationHeader applicationHeader, string applicationToken) { return(applicationsHandler.ApproveAppRegistration(applicationHeader, applicationToken)); }
public BasicOutputTypeOfApplicationType RequestAppRegistration(ApplicationHeader applicationHeader, string applicationName) { return(applicationsHandler.RequestAppRegistration(applicationName)); }
public BasicOutputTypeOfBoolean IsImplementing(ApplicationHeader applicationHeader, string method, string version) { return(applicationsHandler.IsImplementing(applicationHeader, method, version)); }
public BasicOutputTypeOfArrayOfServiceVersionType GetCapabillities(ApplicationHeader applicationHeader) { return(applicationsHandler.GetCapabilities(applicationHeader)); }
void Initialize() { Recognized = false; if (BaseStream == null) { return; } BaseStream.Seek(0, SeekOrigin.Begin); byte[] buffer = new byte[Marshal.SizeOf(typeof(GeodeHeaderV2))]; BaseStream.Read(buffer, 0, buffer.Length); header = BigEndianMarshal.ByteArrayToStructureLittleEndian <GeodeHeader>(buffer); header2 = BigEndianMarshal.ByteArrayToStructureLittleEndian <GeodeHeaderV2>(buffer); Recognized = header.magic == GEOS_ID && header.type == FileType.GFT_EXECUTABLE || header2.magic == GEOS2_ID && header2.type == FileType2.GFT_EXECUTABLE; if (!Recognized) { return; } isNewHeader = header2.magic == GEOS2_ID; RequiredOperatingSystem = new OperatingSystem { Name = "GEOS", MajorVersion = isNewHeader ? 2 : 1 }; List <string> strings = new List <string> { StringHandlers.CToString(isNewHeader ? header2.name : header.name, geosEncoding), StringHandlers.CToString(isNewHeader ? header2.copyright : header.copyright, geosEncoding), StringHandlers.CToString(isNewHeader ? header2.info : header.info, geosEncoding) }; uint segmentBase = 0; if (isNewHeader) { BaseStream.Position = Marshal.SizeOf(typeof(GeodeHeaderV2)); buffer = new byte[Marshal.SizeOf(typeof(ApplicationHeaderV2))]; segmentBase = (uint)Marshal.SizeOf(typeof(GeodeHeaderV2)); BaseStream.Read(buffer, 0, buffer.Length); applicationHeader2 = BigEndianMarshal.ByteArrayToStructureLittleEndian <ApplicationHeaderV2>(buffer); imports = new Import[applicationHeader2.imports]; exports = new Export[applicationHeader2.exports]; segments = new SegmentDescriptor[applicationHeader2.segments]; strings.Add($"{StringHandlers.CToString(applicationHeader2.name, geosEncoding).Trim()}.{StringHandlers.CToString(applicationHeader2.extension, geosEncoding).Trim()}"); } else { BaseStream.Position = Marshal.SizeOf(typeof(GeodeHeader)); buffer = new byte[Marshal.SizeOf(typeof(ApplicationHeader))]; BaseStream.Read(buffer, 0, buffer.Length); applicationHeader = BigEndianMarshal.ByteArrayToStructureLittleEndian <ApplicationHeader>(buffer); imports = new Import[applicationHeader.imports]; exports = new Export[applicationHeader.exports]; segments = new SegmentDescriptor[applicationHeader.segments]; strings.Add($"{StringHandlers.CToString(applicationHeader.name, geosEncoding).Trim()}.{StringHandlers.CToString(applicationHeader.extension, geosEncoding).Trim()}"); } buffer = new byte[Marshal.SizeOf(typeof(Import))]; for (int i = 0; i < imports.Length; i++) { BaseStream.Read(buffer, 0, buffer.Length); imports[i] = BigEndianMarshal.ByteArrayToStructureLittleEndian <Import>(buffer); strings.Add(StringHandlers.CToString(imports[i].name, geosEncoding).Trim()); } buffer = new byte[Marshal.SizeOf(typeof(Export))]; for (int i = 0; i < exports.Length; i++) { BaseStream.Read(buffer, 0, buffer.Length); exports[i] = BigEndianMarshal.ByteArrayToStructureLittleEndian <Export>(buffer); } if (segments.Length > 0) { buffer = new byte[Marshal.SizeOf(typeof(SegmentDescriptor)) * segments.Length]; BaseStream.Read(buffer, 0, buffer.Length); Segment[] mySegments = new Segment[segments.Length]; for (int i = 0; i < segments.Length; i++) { segments[i].length = BitConverter.ToUInt16(buffer, 2 * i); segments[i].offset = BitConverter.ToUInt32(buffer, 2 * segments.Length + 4 * i) + segmentBase; segments[i].relocs_length = BitConverter.ToUInt16(buffer, 6 * segments.Length + 2 * i); segments[i].flags = (SegmentFlags)BitConverter.ToUInt16(buffer, 8 * segments.Length + 2 * i); mySegments[i] = new Segment { Flags = $"{segments[i].flags}", Offset = segments[i].offset, Size = segments[i].length }; if (i == 1) { mySegments[i].Name = ".idata"; } else if (segments[i].flags.HasFlag(SegmentFlags.HAF_CODE)) { mySegments[i].Name = ".text"; } else if (segments[i].flags.HasFlag(SegmentFlags.HAF_OBJECT_RESOURCE)) { mySegments[i].Name = ".rsrc"; } else if (segments[i].flags.HasFlag(SegmentFlags.HAF_ZERO_INIT)) { mySegments[i].Name = ".bss"; } else if (segments[i].flags.HasFlag(SegmentFlags.HAF_READ_ONLY)) { mySegments[i].Name = ".rodata"; } else { mySegments[i].Name = ".data"; } } Segments = mySegments; } strings.Remove(""); strings.Remove(null); Strings = strings; }
public static ApplicationCompositionDefinition GetInstance([NotNull] string @from, [NotNull] string relationship, string label, ApplicationCompositionSchema schema, string showExpression, string toolTip, bool hidden, ApplicationHeader header) { var composition = new ApplicationCompositionDefinition(from, relationship, label, schema, showExpression, toolTip, hidden, header); composition.SetLazyResolver(new Lazy <EntityAssociation>( () => { var metadata = MetadataProvider.Application(@from); var suffixed = EntityUtil.GetRelationshipName(relationship); return(MetadataProvider .Entity(MetadataProvider.Application(@from).Entity) .Associations .FirstOrDefault(a => a.Qualifier == suffixed)); })); return(composition); }
public BasicOutputTypeOfBirthdateSubscriptionType SubscribeOnBirthdate(ApplicationHeader applicationHeader, ChannelBaseType notificationChannel, int?age, int priorDays, string[] personCivilRegistrationIdentifiers) { return(subscriptionsHandler.SubscribeOnBirthdate(applicationHeader, notificationChannel, age, priorDays, GetUuids(applicationHeader, personCivilRegistrationIdentifiers))); }
public ApplicationCompositionDefinition(string @from, string relationship, string label, ApplicationCompositionSchema schema, string showExpression, string toolTip, bool hidden, ApplicationHeader header) : base(from, label, showExpression, toolTip) { if (relationship == null) { throw new ArgumentNullException("relationship"); } _relationship = relationship; _schema = schema; isHidden = hidden; Header = header; if (isHidden) { //if hidden then the detail schema can be marked as empty _schema.DetailSchema = ""; } }
public BasicOutputTypeOfChangeSubscriptionType Subscribe(ApplicationHeader applicationHeader, ChannelBaseType notificationChannel, string[] personCivilRegistrationIdentifiers) { return(subscriptionsHandler.Subscribe(applicationHeader, notificationChannel, GetUuids(applicationHeader, personCivilRegistrationIdentifiers))); }
private Guid[] GetUuids(ApplicationHeader applicationHeader, string[] cprNumbers) { PartAdapter adpt = new PartAdapter(Properties.Settings.Default.CPRBrokerWebServiceUrl); return(Array.ConvertAll <string, Guid>(cprNumbers, cpr => adpt.GetUuid(applicationHeader.ApplicationToken, cpr))); }
public BasicOutputTypeOfArrayOfSubscriptionType GetActiveSubscriptions(ApplicationHeader applicationHeader) { return(subscriptionsHandler.GetActiveSubscriptionsList(applicationHeader)); }
public IEnumerable <byte> GetBytes() { return(ApplicationHeader.GetBytes().Concat(PDU.GetBytes())); }
protected virtual void ConfigureApplicationHeader(ApplicationHeader header) { }