Beispiel #1
0
        /// <summary>
        /// Returns a string representation of the given field in the given block
        /// </summary>
        public static string Render(ExtendedUpdateFieldId fieldId, UpdateBlock block)
        {
            var renderer = FieldRenderUtil.GetRenderer(fieldId.ObjectType);

            uint fieldNum = (uint)fieldId.RawId;
            var field = renderer.Fields.Get(fieldNum);
            if (field != null)
            {
                string strVal;
                field.Renderer(field, block.Values, out strVal);
                return strVal;
            }

            return block.Values.GetUInt32(fieldNum).ToString();
        }
Beispiel #2
0
 /// <summary>
 /// Renders the entry at the given id (or null if field is not set) as a string
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public string this[ExtendedUpdateFieldId id]
 {
     get { return FieldRenderer.Render(id, this); }
 }