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


C# ISerializer.Requires方法代码示例

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


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

示例1: Listeners

        internal Listeners(XDMessagingClient client, ISerializer serializer)
        {
            client.Requires("client").IsNotNull();
            serializer.Requires("serializer").IsNotNull();

            this.serializer = serializer;
        }
开发者ID:TheCodeKing,项目名称:XDMessaging.Net,代码行数:7,代码来源:Listeners.cs

示例2: 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

示例3: WinMsgDataGram

        internal WinMsgDataGram(ISerializer serializer, string channel, string dataType, string message)
        {
            serializer.Requires("serializer").IsNotNull();

            this.serializer = serializer;
            allocatedMemory = false;
            dataStruct = new Native.COPYDATASTRUCT();
            dataGram = new DataGram(channel, dataType, message);
        }
开发者ID:TheCodeKing,项目名称:XDMessaging.Net,代码行数:9,代码来源:WinMsgDataGram.cs

示例4: NetworkRelayBroadcaster

        public NetworkRelayBroadcaster(ISerializer serializer, XDTransportMode originalTransportMode,
            IXDBroadcaster networkBroadcaster)
        {
            serializer.Requires("serializer").IsNotNull();
            networkBroadcaster.Requires("networkBroadcaster").IsNotNull();

            this.serializer = serializer;
            this.originalTransportMode = originalTransportMode;
            this.networkBroadcaster = networkBroadcaster;
            networkChannel = GetNetworkListenerName(originalTransportMode);
        }
开发者ID:TheCodeKing,项目名称:XDMessaging.Net,代码行数:11,代码来源:NetworkRelayBroadcaster.cs

示例5: XDAmazonBroadcaster

        internal XDAmazonBroadcaster(ISerializer serializer, IPublisherService publisherService,
            TopicRepository topicRepository)
        {
            serializer.Requires("serializer").IsNotNull();
            publisherService.Requires("publisherService").IsNotNull();
            topicRepository.Requires("topicRepository").IsNotNull();

            this.serializer = serializer;
            this.publisherService = publisherService;
            this.topicRepository = topicRepository;
        }
开发者ID:TheCodeKing,项目名称:XDMessaging.Net,代码行数:11,代码来源:XDAmazonBroadcaster.cs

示例6: XDAmazonListener

        internal XDAmazonListener(IIdentityProvider identityProvider, ISerializer serializer,
            ITopicRepository topicRepository,
            ISubscriberRepository subscriberRepository, ISubscriptionService subscriptionService)
        {
            identityProvider.Requires("identityProvider").IsNotNull();
            serializer.Requires("serializer").IsNotNull();
            topicRepository.Requires("topicRepository").IsNotNull();
            subscriberRepository.Requires("subscriberRepository").IsNotNull();
            subscriptionService.Requires("subscriptionService").IsNotNull();

            useLongLiveQueues = identityProvider.Scope == IdentityScope.Machine;
            uniqueInstanceId = identityProvider.GetUniqueId();
            this.serializer = serializer;
            this.topicRepository = topicRepository;
            this.subscriberRepository = subscriberRepository;
            this.subscriptionService = subscriptionService;
        }
开发者ID:TheCodeKing,项目名称:XDMessaging.Net,代码行数:17,代码来源:XdAmazonListener.cs

示例7: XDWinMsgListener

        internal XDWinMsgListener(ISerializer serializer)
        {
            serializer.Requires("serializer").IsNotNull();

            this.serializer = serializer;

            var p = new CreateParams
            {
                Width = 0,
                Height = 0,
                X = 0,
                Y = 0,
                Caption = string.Concat("TheCodeKing.Net.XDServices.", Guid.NewGuid().ToString()),
                Parent = IntPtr.Zero
            };

            CreateHandle(p);
        }
开发者ID:TheCodeKing,项目名称:XDMessaging.Net,代码行数:18,代码来源:XDWinMsgListener.cs

示例8: XDIOStreamBroadcaster

        internal XDIOStreamBroadcaster(ISerializer serializer)
        {
            serializer.Requires("serializer").IsNotNull();

            this.serializer = serializer;
        }
开发者ID:TheCodeKing,项目名称:XDMessaging.Net,代码行数:6,代码来源:XDIOStreamBroadcaster.cs

示例9: Broadcasters

        internal Broadcasters(XDMessagingClient client, ISerializer serializer)
        {
            serializer.Requires("serializer").IsNotNull();

            this.serializer = serializer;
        }
开发者ID:TheCodeKing,项目名称:XDMessaging.Net,代码行数:6,代码来源:Broadcasters.cs


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