Exemplo n.º 1
0
        public string NewID <T>(int NumLength)
        {
            string fname   = typeof(T).FullName;
            var    service = XCloud.GetXService(R.appidbuilder);
            var    api     = service[R.apiidcreate2];
            string url     = string.Format(api.ApiInfo.Route, XCloud.Current.AppID,
                                           System.Web.HttpUtility.UrlEncode(fname), NumLength);

            return(api.Get(url));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 直接引用依赖
 /// </summary>
 /// <param name="serializeable"></param>
 /// <returns></returns>
 public static XCloud CreateXCloud(ISerializeable serializeable)
 {
     if (_xCloud == null)
     {
         lock (objLock) {
             if (_xCloud == null)
             {
                 if (serializeable == null)
                 {
                     throw new CloudConfigException("xCloud init fail, ISerializeable is null ");
                 }
                 var x = new XCloud(serializeable);
                 _xCloud = x;
             }
         }
     }
     return(_xCloud);
 }