public static HelloMessageCD1 Create(DiscoveryMessageSequence messageSequence, EndpointDiscoveryMetadata endpointDiscoveryMetadata)
 {
     return(new HelloMessageCD1()
     {
         MessageSequence = DiscoveryMessageSequenceCD1.FromDiscoveryMessageSequence(messageSequence),
         Hello = EndpointDiscoveryMetadataCD1.FromEndpointDiscoveryMetadata(endpointDiscoveryMetadata)
     });
 }
        public IAsyncResult BeginAnnounceOffline(EndpointDiscoveryMetadata metadata, DiscoveryMessageSequence sequence, AsyncCallback callback, object state)
        {
            var md  = new EndpointDiscoveryMetadataCD1(metadata);
            var seq = new DiscoveryMessageSequenceCD1(sequence);
            var msg = new MessageContractsCD1.OfflineAnnouncement()
            {
                EndpointDiscoveryMetadata = md, MessageSequence = seq
            };

            return(Channel.BeginOfflineAnnouncement(msg, callback, state));
        }
        public static ResolveMatchesCD1 Create(EndpointDiscoveryMetadata endpointDiscoveryMetadata)
        {
            ResolveMatchesCD1 resolveMatches = new ResolveMatchesCD1();

            if (endpointDiscoveryMetadata != null)
            {
                resolveMatches.ResolveMatch =
                    EndpointDiscoveryMetadataCD1.FromEndpointDiscoveryMetadata(endpointDiscoveryMetadata);
            }

            return(resolveMatches);
        }