コード例 #1
0
ファイル: UserCall.cs プロジェクト: pgurenko/Locations
        public void JoinLocation(AudioVideoCall incomingCall, Location location)
        {
            _location = location;

            // Call Leg 1
            BackToBackCallSettings settings1 = new BackToBackCallSettings(incomingCall);
            // Call Leg 2
            BackToBackCallSettings settings2 = new BackToBackCallSettings(new AudioVideoCall(location.Conversation));

            settings2.CallEstablishOptions = new AudioVideoCallEstablishOptions()
            {
                UseGeneratedIdentityForTrustedConference = true,
                SupportsReplaces = CapabilitySupport.Supported
            };

            // Create and establish the back to back call.
            _b2bCall = new BackToBackCall(settings1, settings2);
            _b2bCall.StateChanged += new EventHandler<BackToBackCallStateChangedEventArgs>(_b2bCall_StateChanged);
            _b2bCall.BeginEstablish(
                ar =>
                {
                    try
                    {
                        _b2bCall.EndEstablish(ar);

                        EstablishControlCall();
                    }
                    catch (RealTimeException ex)
                    {
                        Log(ex.ToString());
                    }
                },
                null);
        }
コード例 #2
0
        public static Cargo NewCargo(TrackingId trackingId, Location origin, Location destination,
                                     DateTime arrivalDeadline)
        {           

            var routeSpecification = new RouteSpecification(origin, destination, arrivalDeadline);
            return new Cargo(trackingId, routeSpecification);
        }
コード例 #3
0
ファイル: SampleVoyages.cs プロジェクト: chandmk/esddd
 private static Voyage CreateVoyage(string id, Location from, Location to)
 {
     var carrierMovements = new List<CarrierMovement>
                                {new CarrierMovement(from, to, new DateTime(), new DateTime())};
     var schedule = new Schedule(carrierMovements);
     return new Voyage(new VoyageNumber(id), schedule);
 }
コード例 #4
0
ファイル: UserCall.cs プロジェクト: pgurenko/Locations
 public UserCall(string uri, AudioVideoCall avCall, Location location)
 {
     _uri = uri;
     JoinLocation(avCall, location);
 }