private FrontendObject ProcessObjectTypeTag(FrontendObject frontendObject, ObjectTypeTag objectTypeTag) { FrontendObject newInstance; switch (objectTypeTag.Type) { case FEObjType.FE_Image: newInstance = new FrontendImage(frontendObject); break; case FEObjType.FE_Group: newInstance = new FrontendGroup(frontendObject); break; case FEObjType.FE_String: newInstance = new FrontendString(frontendObject); break; case FEObjType.FE_MultiImage: newInstance = new FrontendMultiImage(frontendObject); break; case FEObjType.FE_ColoredImage: newInstance = new FrontendColoredImage(frontendObject); break; default: throw new IndexOutOfRangeException($"cannot handle object type: {objectTypeTag.Type}"); } newInstance.Type = objectTypeTag.Type; return(newInstance); }
private FrontendObject ProcessStringBufferFormattingTag(FrontendString frontendString, StringBufferFormattingTag stringBufferFormattingTag) { frontendString.Formatting = stringBufferFormattingTag.Formatting; return(frontendString); }
private FrontendObject ProcessStringBufferLabelHashTag(FrontendString frontendString, StringBufferLabelHashTag stringBufferLabelHashTag) { frontendString.Hash = stringBufferLabelHashTag.Hash; return(frontendString); }
private FrontendObject ProcessStringBufferMaxWidthTag(FrontendString frontendString, StringBufferMaxWidthTag stringBufferMaxWidthTag) { frontendString.MaxWidth = stringBufferMaxWidthTag.MaxWidth; return(frontendString); }
private FrontendObject ProcessStringBufferTextTag(FrontendString frontendString, StringBufferTextTag stringBufferTextTag) { frontendString.Value = stringBufferTextTag.Value; return(frontendString); }