コード例 #1
0
        public async Task <IEnumerable <UcwaAppPhoneLine> > GetPhoneLines(string uri = null)
        {
            this.Phones = await GetPhones(uri);

            List <UcwaAppPhoneLine> phoneList = new List <UcwaAppPhoneLine>();

            foreach (var xElem in this.Phones.EmbeddedResourceElements)
            {
                var resPhone     = new UcwaResource(xElem);
                var phoneType    = resPhone.GetPropertyValue("type");
                var phoneNumber  = resPhone.GetPropertyValue("number");
                var inConactCard = resPhone.GetPropertyValue("includeInContactCard");
                phoneList.Add(new UcwaAppPhoneLine(phoneNumber, phoneType, inConactCard));
            }
            return(phoneList.AsEnumerable());
        }
        public async Task <string> CreateMeeting()
        {
            // create onlineMeetings
            var meetingUri          = this.ucwaApp.ApplicationResource.GetEmbeddedResourceUri("onlineMeetings");
            var myOnlineMeetingsUri = this.ucwaApp.ApplicationResource.GetEmbeddedResource("onlineMeetings").GetEmbeddedResourceUri("myOnlineMeetings");
            var meetingInput        = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                                      "<input xmlns=\"http://schemas.microsoft.com/rtc/2012/03/ucwa\">" +
                                      //" <property name=\"accessLevel\">Locked</property>" +
                                      " <propertyList name=\"attendees\">" +
                                      "   <item>sip:[email protected]</item>" +
                                      "   <item>sip:[email protected]</item>" +
                                      " </propertyList>" +
                                      " <property name=\"automaticLeaderAssignment\">Disabled</property>" +
                                      " <property name=\"description\">We'll be meeting to review the sales numbers for this past quarter and discuss projections for the next two quarters.</property>" +
                                      //" <property name=\"entryExitAnnouncement\">Unsupported</property>"+
                                      //" <property name=\"expirationTime\">2014-03-09T16:34:29.9597697-07:00</property>"+
                                      //" <propertyList name=\"leaders\">"+
                                      //"   <item>sip:[email protected]</item>"+
                                      //" </propertyList>"+
                                      //" <property name=\"lobbyBypassForPhoneUsers\">Disabled</property>"+
                                      //" <property name=\"phoneUserAdmission\">Disabled</property>"+
                                      " <property name=\"subject\">Test myOnlineMeetings</property>" +
                                      "</input>";
            var opResult = await this.ucwaApp.Transport.PostResourceAsync(myOnlineMeetingsUri, meetingInput);

            string joinUrl = null;

            if (opResult.StatusCode == HttpStatusCode.OK)
            {
                this._resMyOnlineMeetings = opResult.Resource;
                joinUrl = _resMyOnlineMeetings.GetPropertyValue("joinUrl");  // used by attendees to join the meeting with a PUT request
            }
            return(joinUrl);
        }
コード例 #3
0
        public async Task <string> GetLocationCoordinates(string uri = null)
        {
            this.Location = await GetLocation(uri);

            return(Location.GetPropertyValue("location"));
        }