示例#1
0
 public static void RegisterHandler(string typeFullName,HashAlbianObjectHandler<IAlbianObject> splitHandler)
 {
     string routingName = string.Empty;
     if (string.IsNullOrEmpty(routingName))
     {
         routingName = PersistenceParser.DefaultRoutingName;
     }
     //Type[] types = splitHandler.GetType().GetGenericArguments();
     RegisterHandler(routingName,typeFullName,splitHandler);
 }
示例#2
0
        public static void RegisterHandler(string typeFullName, HashAlbianObjectHandler <IAlbianObject> splitHandler)
        {
            string routingName = string.Empty;

            if (string.IsNullOrEmpty(routingName))
            {
                routingName = PersistenceParser.DefaultRoutingName;
            }
            //Type[] types = splitHandler.GetType().GetGenericArguments();
            RegisterHandler(routingName, typeFullName, splitHandler);
        }
示例#3
0
        public static string GetTableFullName(IRoutingAttribute routing, IAlbianObject target)
        {
            HashAlbianObjectHandler <IAlbianObject> handler = HashAlbianObjectManager.GetHandler(routing.Name, AssemblyManager.GetFullTypeName(target));
            string tableName = null == handler
                                   ? routing.TableName
                                   : String.Format("{0}{1}", routing.TableName, handler(target));

            return("dbo" == routing.Owner || String.IsNullOrEmpty(routing.Owner)
                       ? tableName
                       : String.Format("[{0}].[{1}]", routing.Owner, tableName));
        }
示例#4
0
 public static void RegisterHandler(string routingName,string typeFullName,HashAlbianObjectHandler<IAlbianObject> splitHandler)
 {
     if (string.IsNullOrEmpty(routingName))
     {
         throw new ArgumentNullException("routingName");
     }
     //string typeFullName = AssemblyManager.GetFullTypeName<T>();
     if (null == splitHandler)
         return;
     string key = GetHashTableKey(routingName, typeFullName);
     if (!_hashAlbianObjectHandlers.ContainsKey(key))
     {
         _hashAlbianObjectHandlers.Add(key, splitHandler);
     }
     else
     {
         _hashAlbianObjectHandlers[key] = splitHandler;
     }
 }
示例#5
0
        public static void RegisterHandler(string routingName, string typeFullName, HashAlbianObjectHandler <IAlbianObject> splitHandler)
        {
            if (string.IsNullOrEmpty(routingName))
            {
                throw new ArgumentNullException("routingName");
            }
            //string typeFullName = AssemblyManager.GetFullTypeName<T>();
            if (null == splitHandler)
            {
                return;
            }
            string key = GetHashTableKey(routingName, typeFullName);

            if (!_hashAlbianObjectHandlers.ContainsKey(key))
            {
                _hashAlbianObjectHandlers.Add(key, splitHandler);
            }
            else
            {
                _hashAlbianObjectHandlers[key] = splitHandler;
            }
        }