internal NavigationUriCall(NavigationUriType type, String remoteParty, bool withVideo) : base(type) { Debug.Assert((type == NavigationUriType.MakeCall || type == NavigationUriType.ReceiveCall)); mRemoteParty = remoteParty; mWithVideo = withVideo; }
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); } } }
internal NavigationUri(NavigationUriType type) { mType = type; }
internal NavigationUriCall(NavigationUriType type, String remoteParty, bool withVideo) : base(type) { Debug.Assert((type == NavigationUriType.MakeCall || type == NavigationUriType.ReceiveCall)); mRemoteParty = remoteParty; mWithVideo = withVideo; }
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); }
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)); }
internal NavigationUri(NavigationUriType type) { mType = type; }