本文整理汇总了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;
}
示例2: ToConsumedMessage
internal ConsumedMessage ToConsumedMessage(ISerializer serializer, MessageBinding messageBinding)
{
return new ConsumedMessage(serializer.Deserialize(_args.Body,
messageBinding.RuntimeType,
_args.BasicProperties.CreateEncoding()),
_args);
}
示例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;
}
示例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);
}
示例5: ExpressionSerializer
public ExpressionSerializer(ISerializer serializer, FactorySettings factorySettings = null)
{
if (serializer == null)
throw new ArgumentNullException("serializer");
_serializer = serializer;
_factorySettings = factorySettings;
}
示例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);
}
}
示例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;
}
示例8: NewtonsoftJsonSerializer
public NewtonsoftJsonSerializer( ISerializer serializer )
{
ContentType = serializer.ContentType;
DateFormat = serializer.DateFormat;
Namespace = serializer.Namespace;
RootElement = serializer.RootElement;
}
示例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);
}
};
}
示例10: InProcessQueueSender
public InProcessQueueSender(ISerializer serializer, Queue queue, InProcessMessageStore messageStore, ILogger logger)
{
_serializer = serializer;
_queue = queue;
_messageStore = messageStore;
_logger = logger;
}
示例11: XDIOStreamListener
internal XDIOStreamListener(ISerializer serializer)
{
serializer.Requires().IsNotNull();
this.serializer = serializer;
watcherList = new Dictionary<string, FileSystemWatcher>(StringComparer.InvariantCultureIgnoreCase);
}
示例12: WorkerEngine
public WorkerEngine(ISerializer serializer, IHandler handler, string loadbalancerAddress)
{
m_serializer = serializer;
m_loadbalancerAddress = loadbalancerAddress;
m_handler = handler;
m_nextMessageId = 0;
}
示例13: ConfigurationStore
public ConfigurationStore(IZipper zipper, IDeserializer deserializer, ISerializer serializer, IDialog dialog)
{
_zipper = zipper;
_deserializer = deserializer;
_serializer = serializer;
_dialog = dialog;
}
示例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));
}
}
示例15: AttachmentResponseFactory
public AttachmentResponseFactory(ISerializer serializer)
{
Ensure.That(serializer, "serializer").IsNotNull();
SuccessfulResponseMaterializer = new AttachmentResponseMaterializer();
FailedResponseMaterializer = new FailedResponseMaterializer(serializer);
}