Exemplo n.º 1
0
 internal NavigationUriCall(NavigationUriType type, String remoteParty, bool withVideo)
     : base(type)
 {
     Debug.Assert((type == NavigationUriType.MakeCall || type == NavigationUriType.ReceiveCall));
     mRemoteParty = remoteParty;
     mWithVideo   = withVideo;
 }
Exemplo n.º 2
0
        internal static NavigationUri Build(Uri uri)
        {
            String uriString       = uri.ToString();
            String uriParamsString = uriString.Substring(uriString.IndexOf("?") + 1);

            String[]          uriParams         = uriParamsString.Split("&".ToArray());
            NavigationUriType navigationUriType = NavigationUriType.None;
            String            remoteParty       = null;
            bool withVideo = false;

            foreach (String uriParam in uriParams)
            {
                String[] kvp = uriParam.Split("=".ToArray());
                if (kvp.Length != 2)
                {
                    continue;
                }
                if (kvp[0] == "Type")
                {
                    navigationUriType = (NavigationUriType)Enum.Parse(typeof(NavigationUriType), kvp[1]);
                }
                else if (kvp[0] == "RemoteParty")
                {
                    remoteParty = kvp[1];
                }
                else if (kvp[0] == "WithVideo")
                {
                    withVideo = Boolean.Parse(kvp[1]);
                }
            }

            switch (navigationUriType)
            {
            case NavigationUriType.MakeCall:
            {
                Debug.Assert(!String.IsNullOrEmpty(remoteParty));
                return(new NavigationUriMakeCall(remoteParty, withVideo));
            }

            case NavigationUriType.ReceiveCall:
            {
                Debug.Assert(!String.IsNullOrEmpty(remoteParty));
                return(new NavigationUriReceiveCall(remoteParty, withVideo));
            }

            default:
            {
                return(null);
            }
            }
        }
Exemplo n.º 3
0
 internal NavigationUri(NavigationUriType type)
 {
     mType = type;
 }
Exemplo n.º 4
0
 internal NavigationUriCall(NavigationUriType type, String remoteParty, bool withVideo)
     : base(type)
 {
     Debug.Assert((type == NavigationUriType.MakeCall || type == NavigationUriType.ReceiveCall));
     mRemoteParty = remoteParty;
     mWithVideo = withVideo;
 }
Exemplo n.º 5
0
 private static String BuildCallUriString(String pageUri, NavigationUriType type, String remoteParty, bool withVideo)
 {
     return String.Format("/{0}?Type={1}&RemoteParty={2}&WithVideo={3}", pageUri, type, remoteParty, withVideo);
 }
Exemplo n.º 6
0
 private static String BuildCallUriString(String pageUri, NavigationUriType type, String remoteParty, bool withVideo)
 {
     return(String.Format("/{0}?Type={1}&RemoteParty={2}&WithVideo={3}", pageUri, type, remoteParty, withVideo));
 }
Exemplo n.º 7
0
 internal NavigationUri(NavigationUriType type)
 {
     mType = type;
 }