Пример #1
0
        public override int Serialize(TSource source, SerializationContext context)
        {
            Guid value = GetValue(source);

            if (IsOptional && value == DefaultValue)
            {
                return(0);
            }
            return(WritePrefix(context)
                   + ProtoGuid.Serialize(value, context, true));
        }