当前位置: 首页>>代码示例>>C#>>正文


C# ISerializer类代码示例

本文整理汇总了C#中ISerializer的典型用法代码示例。如果您正苦于以下问题:C# ISerializer类的具体用法?C# ISerializer怎么用?C# ISerializer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ISerializer类属于命名空间,在下文中一共展示了ISerializer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CommandCoordinator

        public CommandCoordinator(ISerializer serializer, IHubProxyManager hubProxyFactory)
        {
            _serializer = serializer;

            _proxy = hubProxyFactory.Get<Proxies.ICommandCoordinator>();
            _proxy.EventsProcessed += EventsProcessed;
        }
开发者ID:JoB70,项目名称:Bifrost,代码行数:7,代码来源:CommandCoordinator.cs

示例2: ToConsumedMessage

 internal ConsumedMessage ToConsumedMessage(ISerializer serializer, MessageBinding messageBinding)
 {
     return new ConsumedMessage(serializer.Deserialize(_args.Body,
                                                       messageBinding.RuntimeType,
                                                       _args.BasicProperties.CreateEncoding()),
                                _args);
 }
开发者ID:naighes,项目名称:Carrot,代码行数:7,代码来源:ConsumedMessageContext.cs

示例3: DefaultEndpointCircuitBreaker

 public DefaultEndpointCircuitBreaker(IPipelineTransport transport, ISerializer serializer, EndpointDefinition definitioin)
 {
     this.ErrorStrategy = new EndpointPostConsumeStrategy.ErrorEndpointPerEndpoint(transport, serializer, definitioin);
     this.RetryStrategy = new EndpointPostConsumeStrategy.RetryEndpointPerEndpoint(transport, serializer, definitioin);
     this.SuccessStrategy = new EndpointPostConsumeStrategy.NoSuccessStrategy();
     this.MaximumMessageAge = 5;
 }
开发者ID:fetishism,项目名称:Cronus,代码行数:7,代码来源:DefaultEndpointCircuitBreaker.cs

示例4: RegisterSerilizer

 public void RegisterSerilizer(ISerializer serializer)
 {
     int id = nextID++;
     this.idToType.Add(id, serializer.SerializeType);
     this.typeToID.Add(serializer.SerializeType, id);
     this.serializerByType.Add(serializer.SerializeType, serializer);
 }
开发者ID:gustavAR,项目名称:Spang,代码行数:7,代码来源:SerializeManager.cs

示例5: ExpressionSerializer

 public ExpressionSerializer(ISerializer serializer, FactorySettings factorySettings = null)
 {
     if (serializer == null)
         throw new ArgumentNullException("serializer");
     _serializer = serializer;
     _factorySettings = factorySettings;
 }
开发者ID:korover,项目名称:Serialize.Linq,代码行数:7,代码来源:ExpressionSerializer.cs

示例6: ContainmentWhereFragment

        public ContainmentWhereFragment(ISerializer serializer, BinaryExpression binary)
        {
            _serializer = serializer;

            var visitor = new FindMembers();
            visitor.Visit(binary.Left);

            var members = visitor.Members;

            if (members.Count > 1)
            {
                var dict = new Dictionary<string, object>();
                var member = members.Last();
                var value = MartenExpressionParser.Value(binary.Right);
                dict.Add(member.Name, value);

                members.Reverse().Skip(1).Each(m =>
                {
                    dict = new Dictionary<string, object> { { m.Name, dict}};
                });

                _dictionary = dict;
            }
            else
            {
                _dictionary = new Dictionary<string, object>();

                var member = members.Single();
                var value = MartenExpressionParser.Value(binary.Right);
                _dictionary.Add(member.Name, value);

            }
        }
开发者ID:bojanv91,项目名称:Marten,代码行数:33,代码来源:ContainmentWhereFragment.cs

示例7: StatefullAggregateRepository

 public StatefullAggregateRepository(AggregateStore store, IDataFactory dataFactory, ISerializer serializer, AggregateRegistry aggregateRegistry, ITransitionStore transitionStore, AggregateDefinition definition)
     : base(store, dataFactory, definition)
 {
     _serializer = serializer;
     _aggregateRegistry = aggregateRegistry;
     _transitionStore = transitionStore;
 }
开发者ID:paralect,项目名称:immutably,代码行数:7,代码来源:StatefullAggregateRepository.cs

示例8: NewtonsoftJsonSerializer

 public NewtonsoftJsonSerializer( ISerializer serializer )
 {
     ContentType = serializer.ContentType;
     DateFormat = serializer.DateFormat;
     Namespace = serializer.Namespace;
     RootElement = serializer.RootElement;
 }
开发者ID:NewSpring,项目名称:rock-apollos,代码行数:7,代码来源:NewtonsoftJsonSerializer.cs

示例9: GameCreationManager

        public GameCreationManager(IPluginClient pluginClient, ISerializer serializer)
        {
            this.createGameService = new PluginService<CreateGameClientMessage, GameInviteReceivedServerMessage>(GamifyClientMessageType.CreateGame, GamifyServerMessageType.GameInviteReceived, pluginClient, serializer);
            this.acceptGameService = new PluginService<AcceptGameClientMessage, GameCreatedServerMessage>(GamifyClientMessageType.AcceptGame, GamifyServerMessageType.GameCreated, pluginClient, serializer);
            this.rejectGameService = new PluginService<RejectGameClientMessage, GameRejectedServerMessage>(GamifyClientMessageType.RejectGame, GamifyServerMessageType.GameRejected, pluginClient, serializer);

            this.createGameService.NotificationReceived += (sender, args) =>
            {
                if (this.GameInviteNotificationReceived != null)
                {
                    this.GameInviteNotificationReceived(this, args);
                }
            };

            this.acceptGameService.NotificationReceived += (sender, args) =>
            {
                if (this.GameCreatedNotificationReceived != null)
                {
                    this.GameCreatedNotificationReceived(this, args);
                }
            };

            this.rejectGameService.NotificationReceived += (sender, args) =>
            {
                if (this.GameRejectedNotificationReceived != null)
                {
                    this.GameRejectedNotificationReceived(this, args);
                }
            };
        }
开发者ID:ThinkUpStudios,项目名称:Gamify,代码行数:30,代码来源:GameCreationManager.cs

示例10: InProcessQueueSender

 public InProcessQueueSender(ISerializer serializer, Queue queue, InProcessMessageStore messageStore, ILogger logger)
 {
     _serializer = serializer;
     _queue = queue;
     _messageStore = messageStore;
     _logger = logger;
 }
开发者ID:fenix2222,项目名称:Nimbus,代码行数:7,代码来源:InProcessQueueSender.cs

示例11: XDIOStreamListener

        internal XDIOStreamListener(ISerializer serializer)
        {
            serializer.Requires().IsNotNull();

            this.serializer = serializer;
            watcherList = new Dictionary<string, FileSystemWatcher>(StringComparer.InvariantCultureIgnoreCase);
        }
开发者ID:TheCodeKing,项目名称:XDMessaging.Net,代码行数:7,代码来源:XDIoStreamListener.cs

示例12: WorkerEngine

     public WorkerEngine(ISerializer serializer, IHandler handler, string loadbalancerAddress)
     {
         m_serializer = serializer;
         m_loadbalancerAddress = loadbalancerAddress;
         m_handler = handler;
         m_nextMessageId = 0;
 }
开发者ID:somdoron,项目名称:NetMQ.High,代码行数:7,代码来源:WorkerEngine.cs

示例13: ConfigurationStore

 public ConfigurationStore(IZipper zipper, IDeserializer deserializer, ISerializer serializer, IDialog dialog)
 {
     _zipper = zipper;
     _deserializer = deserializer;
     _serializer = serializer;
     _dialog = dialog;
 }
开发者ID:johanclasson,项目名称:Rester,代码行数:7,代码来源:ConfigurationStore.cs

示例14: ProtoBufRestClient

 /// <summary>
 /// Initializes a new instance of the <see cref="ProtoBufRestClient"/> class.
 /// </summary>
 /// <param name="serializer">
 /// The serializer.
 /// </param>
 /// <param name="client">
 /// The client.
 /// </param>
 /// <exception cref="Exception">
 /// Throws an exception if the serializer does not support ProtoBuffer
 /// </exception>
 public ProtoBufRestClient(ISerializer serializer, HttpClient client = null) : base(serializer, client)
 {
     if (serializer.Format != SerializationFormat.Json)
     {
         throw new Exception(string.Format("Invalid serializer type: {0}. Valid type is: {1}", serializer.Format, SerializationFormat.ProtoBuffer));
     }
 }
开发者ID:GGHG72,项目名称:Xamarin-Forms-Labs,代码行数:19,代码来源:ProtoBufRestClient.cs

示例15: AttachmentResponseFactory

        public AttachmentResponseFactory(ISerializer serializer)
        {
            Ensure.That(serializer, "serializer").IsNotNull();

            SuccessfulResponseMaterializer = new AttachmentResponseMaterializer();
            FailedResponseMaterializer = new FailedResponseMaterializer(serializer);
        }
开发者ID:aldass,项目名称:mycouch,代码行数:7,代码来源:AttachmentResponseFactory.cs


注:本文中的ISerializer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。