IProtoTypeSerializer.cs 655 B

123456789101112131415161718192021
  1. #if !NO_RUNTIME
  2. using ProtoBuf.Meta;
  3. namespace ProtoBuf.Serializers
  4. {
  5. interface IProtoTypeSerializer : IProtoSerializer
  6. {
  7. bool HasCallbacks(TypeModel.CallbackType callbackType);
  8. bool CanCreateInstance();
  9. #if !FEAT_IKVM
  10. object CreateInstance(ProtoReader source);
  11. void Callback(object value, TypeModel.CallbackType callbackType, SerializationContext context);
  12. #endif
  13. #if FEAT_COMPILER
  14. void EmitCallback(Compiler.CompilerContext ctx, Compiler.Local valueFrom, TypeModel.CallbackType callbackType);
  15. #endif
  16. #if FEAT_COMPILER
  17. void EmitCreateInstance(Compiler.CompilerContext ctx);
  18. #endif
  19. }
  20. }
  21. #endif