示例#1
0
        public LiveConnectItem(IDictionary <string, object> source)
        {
            ThrowArgumentException.IfNull(source, "source");
            ThrowArgumentException.IfOutOfRange(!source.ContainsKey("id"), "source");

            this.Properties = source;
        }
        public static string Append(string source, string key, string value)
        {
            ThrowArgumentException.IfNull(source, "source");
            ThrowArgumentException.IfNull(key, "key");
            ThrowArgumentException.IfNull(value, "value");

            ThrowArgumentException.IfOutOfRange(string.IsNullOrEmpty(key), "key");

            return(source + (source.Contains("?") ? "&" : "?") + string.Format("{0}={1}", key, System.Web.HttpUtility.UrlEncode(value)));
        }
        public LiveOperationResult EndUpload(IAsyncResult asyncResult)
        {
            ThrowArgumentException.IfNull(asyncResult, "asyncResult");

            var ar = asyncResult as LiveConnectClientAsyncResult <LiveOperationResult>;

            ThrowArgumentException.IfOutOfRange(ar == null, "asyncResult");

            return(this.End(ar));
        }