public object CreateObject(IObjectSetting setting, Type objectType, string uri, params object[] parameters) { var proxy = ObjectService.CreateObject <IHttpRealProxy>(objectType, uri); var contentType = setting.ConfigSetting.Property.TryGetPropertyValue("contentType"); if (!string.IsNullOrEmpty(contentType)) { proxy.ContentType = contentType; } proxy.Init(); return(proxy.GetTransparentProxy()); }
public T GetDataService <T>() where T : ISessionDataService { var type = typeof(T); if (services.ContainsKey(type)) { return((T)services[type]); } var dt = ObjectService.CreateObject <T>(); dt.SetDataSession(this.dataSession, this.beginTransation); services.Add(type, dt); return(dt); }