public Type GetInteractionBeanType(MessageTypeKey key) { Type value; registry.TryGetValue(key, out value); return(value); }
private void RegisterClass(Type type, String[] versions) { string domainType = type.Name; foreach (var version in versions) { var key = new MessageTypeKey(version, domainType); //Workaround for the fact that we do not have a separate DLL for test classes if (!codeTypeRegistry.ContainsKey(key)) { codeTypeRegistry.Add(key, type); } } }
public Type GetMessagePartClass(VersionNumber version, String type) { MessageTypeKey key = new MessageTypeKey(version, type); var result = GetMessagePartType(key); if (result == null && type.Contains(".")) { String unqualifiedTypeName = StringUtils.SubstringAfter(type, "."); key = new MessageTypeKey(version, unqualifiedTypeName); result = GetMessagePartType(key); if (result == null && unqualifiedTypeName.Contains("_")) { String typeWithoutVersionCode = StringUtils.SubstringBefore(type, ".") + "." + StringUtils.SubstringBefore(unqualifiedTypeName, "_"); result = GetMessagePartClass(version, typeWithoutVersionCode); } } return(result); }
private void RegisterClass(Type type, String[] versions) { var mapping = GetClassAttributes(type, typeof(Hl7PartTypeMappingAttribute)); foreach (var partId in mapping.Value) { foreach (var version in versions) { var key = new MessageTypeKey(version, partId); if (partTypeRegistry.ContainsKey(key)) { continue; // or shall will let it fail ? } partTypeRegistry.Add(key, type); if (typeof(IInteraction).IsAssignableFrom(type)) { registry.Add(key, type); } } } }
private Type GetMessagePartType(MessageTypeKey key) { return(partTypeRegistry.ContainsKey(key) ? partTypeRegistry[key] : null); }
public virtual Interaction GetInteraction(IInteraction tealBean) { MessageTypeKey type = MessageBeanRegistry.GetInstance().GetMessageTypeKey(this.version, tealBean); return(this.service.GetInteraction(this.version, type.GetMessageId())); }
public Type GetCodeType(string domainType, string version) { var key = new MessageTypeKey(version, domainType); return(codeTypeRegistry.ContainsKey(key) ? codeTypeRegistry[key] : null); }