Пример #1
0
 /// <summary>
 /// Initializes a new instance of <see cref="SymbolEntry"/>.
 /// </summary>
 /// <param name="dispatchType">The target <see cref="DispatchTypes"/> of this symbol.</param>
 /// <param name="leftType">The target of this symbol.</param>
 /// <param name="name">The name of this symbol.</param>
 public SymbolEntry(DispatchTypes dispatchType, Type leftType, String name)
     : this()
 {
     this.DispatchType = dispatchType;
     this.LeftType     = leftType;
     this.Name         = name;
 }
Пример #2
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     DispatchTypes dispatchType,
     String name,
     params Expression[] arguments
     )
 {
     return(Dispatch(null, dispatchType, name, arguments));
 }
Пример #3
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">A sequence of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     DispatchTypes dispatchType,
     String name,
     IEnumerable <Expression> arguments
     )
 {
     return(Dispatch(null, dispatchType, name, arguments));
 }
Пример #4
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="typeArguments">A sequence of <see cref="Type"/> objects that represents the type arguments for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     DispatchTypes dispatchType,
     String name,
     IEnumerable <Type> typeArguments,
     params Expression[] arguments
     )
 {
     return(Dispatch(null, dispatchType, name, typeArguments, arguments));
 }
Пример #5
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     String name,
     params Expression[] arguments
     )
 {
     return(Dispatch(symbols, dispatchType, null, name, arguments));
 }
Пример #6
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">A sequence of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     String name,
     IEnumerable <Expression> arguments
     )
 {
     return(Dispatch(symbols, dispatchType, null, name, arguments));
 }
Пример #7
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="left">An <see cref="Expression"/> that representts the receiver or static reference for dispatching.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="typeArguments">A sequence of <see cref="Type"/> objects that represents the type arguments for dispatching.</param>
 /// <param name="arguments">A sequence of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     DispatchTypes dispatchType,
     Expression left,
     String name,
     IEnumerable <Type> typeArguments,
     IEnumerable <Expression> arguments
     )
 {
     return(Dispatch(null, dispatchType, left, name, typeArguments, arguments));
 }
Пример #8
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="left">An <see cref="Expression"/> that representts the receiver or static reference for dispatching.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     Expression left,
     String name,
     params Expression[] arguments
     )
 {
     return(Dispatch(symbols, dispatchType, left, name, Type.EmptyTypes, arguments));
 }
Пример #9
0
 /// <summary>
 /// Gets or sets the symbol with the specified symbol key properties.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns>The symbol value with the specified symbol key properties.</returns>
 public SymbolDefinition this[DispatchTypes dispatchType, String name]
 {
     get
     {
         return(this[dispatchType, null, name]);
     }
     set
     {
         this[dispatchType, null, name] = value;
     }
 }
Пример #10
0
 /// <summary>
 /// Gets or sets the symbol with the specified symbol key properties.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="leftType">The key's <see cref="SymbolEntry.LeftType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns>The symbol value with the specified symbol key properties.</returns>
 public SymbolDefinition this[DispatchTypes dispatchType, Type leftType, String name]
 {
     get
     {
         return(this._symbols[new SymbolEntry(dispatchType, leftType, name)]);
     }
     set
     {
         this._symbols[new SymbolEntry(dispatchType, leftType, name)] = value;
     }
 }
Пример #11
0
 internal DispatchExpression(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     Expression left,
     String name,
     IList <Type> typeArguments,
     IList <Expression> arguments
     )
     : base(symbols)
 {
     this.DispatchType  = dispatchType;
     this.Left          = left;
     this.Name          = name;
     this.TypeArguments = new ReadOnlyCollection <Type>(typeArguments ?? Type.EmptyTypes);
     this.Arguments     = new ReadOnlyCollection <Expression>(arguments ?? Arrays.Empty <Expression>());
     this.SetPosition(arguments.StartWith(left));
 }
Пример #12
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="left">An <see cref="Expression"/> that representts the receiver or static reference for dispatching.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="typeArguments">A sequence of <see cref="Type"/> objects that represents the type arguments for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     Expression left,
     String name,
     IEnumerable <Type> typeArguments,
     params Expression[] arguments
     )
 {
     return(new DispatchExpression(
                symbols,
                dispatchType,
                left,
                name,
                typeArguments != null ? typeArguments.ToArray() : Type.EmptyTypes,
                arguments
                ));
 }
Пример #13
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="left">An <see cref="Expression"/> that representts the receiver or static reference for dispatching.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="typeArguments">A sequence of <see cref="Type"/> objects that represents the type arguments for dispatching.</param>
 /// <param name="arguments">A sequence of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     Expression left,
     String name,
     IEnumerable <Type> typeArguments,
     IEnumerable <Expression> arguments
     )
 {
     return(Dispatch(
                symbols,
                dispatchType,
                left,
                name,
                typeArguments,
                arguments != null ? arguments.ToArray() : Arrays.Empty <Expression>()
                ));
 }
Пример #14
0
 /// <summary>
 /// Initializes a new instance of <see cref="YacqSymbolAttribute"/> class.
 /// </summary>
 /// <param name="dispatchType">The target <see cref="DispatchTypes"/> of this symbol.</param>
 /// <param name="name">The name of this symbol.</param>
 public YacqSymbolAttribute(DispatchTypes dispatchType, String name)
     : this(dispatchType, null, name)
 {
 }
Пример #15
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="left">An <see cref="Expression"/> that representts the receiver or static reference for dispatching.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="typeArguments">A sequence of <see cref="Type"/> objects that represents the type arguments for dispatching.</param>
 /// <param name="arguments">A sequence of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     DispatchTypes dispatchType,
     Expression left,
     String name,
     IEnumerable<Type> typeArguments,
     IEnumerable<Expression> arguments
 )
 {
     return Dispatch(null, dispatchType, left, name, typeArguments, arguments);
 }
Пример #16
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="typeArguments">A sequence of <see cref="Type"/> objects that represents the type arguments for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     DispatchTypes dispatchType,
     String name,
     IEnumerable<Type> typeArguments,
     params Expression[] arguments
 )
 {
     return Dispatch(null, dispatchType, name, typeArguments, arguments);
 }
Пример #17
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="left">An <see cref="Expression"/> that representts the receiver or static reference for dispatching.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="typeArguments">A sequence of <see cref="Type"/> objects that represents the type arguments for dispatching.</param>
 /// <param name="arguments">A sequence of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     Expression left,
     String name,
     IEnumerable<Type> typeArguments,
     IEnumerable<Expression> arguments
 )
 {
     return Dispatch(
         symbols,
         dispatchType,
         left,
         name,
         typeArguments,
         arguments != null ? arguments.ToArray() : Arrays.Empty<Expression>()
     );
 }
Пример #18
0
 /// <summary>
 /// Adds the symbol to this symbol table.
 /// </summary>
 /// <param name="dispatchType">The symbol's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="name">The symbol's <see cref="SymbolEntry.Name"/>.</param>
 /// <param name="definition">The <see cref="SymbolDefinition"/> of the symbol.</param>
 public void Add(DispatchTypes dispatchType, String name, SymbolDefinition definition)
 {
     this.Add(dispatchType, null, name, definition);
 }
Пример #19
0
 /// <summary>
 /// Adds the alias symbol to this symbol table.
 /// </summary>
 /// <param name="dispatchType">The symbol's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="name">The symbol's <see cref="SymbolEntry.Name"/>.</param>
 /// <param name="targetDispatchType">The target symbol's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="targetName">The target symbol's <see cref="SymbolEntry.Name"/>.</param>
 public void Add(DispatchTypes dispatchType, String name, DispatchTypes targetDispatchType, String targetName)
 {
     this.Add(dispatchType, name, this[targetDispatchType, targetName]);
 }
Пример #20
0
 /// <summary>
 /// Removes the symbol with the specified symbol key from this symbol table.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns>
 /// <c>true</c> if the symbol is successfully removed; otherwise, <c>false</c>. This method also returns <c>false</c> if key was not found in the symbol table.
 /// </returns>
 public Boolean Remove(DispatchTypes dispatchType, String name)
 {
     return(this.Remove(dispatchType, null, name));
 }
Пример #21
0
 /// <summary>
 /// Removes the symbol with the specified symbol key from this symbol table.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="leftType">The key's <see cref="SymbolEntry.LeftType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns>
 /// <c>true</c> if the symbol is successfully removed; otherwise, <c>false</c>. This method also returns <c>false</c> if key was not found in the symbol table.
 /// </returns>
 public Boolean Remove(DispatchTypes dispatchType, Type leftType, String name)
 {
     return(this.Remove(new SymbolEntry(dispatchType, leftType, name)));
 }
Пример #22
0
 /// <summary>
 /// Determines whether the specified symbol key is contained in this symbol table's <see cref="Chain"/>.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns><c>true</c> the specified symbol key is contained in this symbol table's <see cref="Chain"/>; otherwise, <c>false</c>.</returns>
 public Boolean ExistsKey(DispatchTypes dispatchType, String name)
 {
     return(this.ExistsKey(dispatchType, null, name));
 }
Пример #23
0
 /// <summary>
 /// Determines whether the specified symbol key is contained in this symbol table's <see cref="Chain"/>.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="leftType">The key's <see cref="SymbolEntry.LeftType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns><c>true</c> the specified symbol key is contained in this symbol table's <see cref="Chain"/>; otherwise, <c>false</c>.</returns>
 public Boolean ExistsKey(DispatchTypes dispatchType, Type leftType, String name)
 {
     return(this.ExistsKey(new SymbolEntry(dispatchType, leftType, name)));
 }
Пример #24
0
 /// <summary>
 /// Determines whether the specified symbol is contained in this symbol table.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns><c>true</c> if this symbol table contains an element with the symbol key; otherwise, <c>false</c>.</returns>
 public Boolean ContainsKey(DispatchTypes dispatchType, String name)
 {
     return(this.ContainsKey(dispatchType, null, name));
 }
Пример #25
0
        /// <summary>
        /// 获取限定条件内劳务人员的数据
        /// </summary>
        /// <returns></returns>
        private string GetSatisticalSqlClause(string enterpriseKey, DispatchTypes dispatchType,
            string queryTimeSpanName, DateTime queryTimeSpanValueStart, DateTime queryTimeSpanValueEnd,
            string serviceRoleName = StringHelper.Empty, Guid? serviceUserGuid = null)
        {
            string sqlClause = String.Empty;
            switch (queryTimeSpanName)
            {
                case "jobStartingTime":
                    sqlClause = @" select  Biz.LaborContractGuid as BizGuid,
                                        '' as SalaryDate,
                                        Biz.EnterpriseGuid as EnterpriseKey,
                                        GE.CompanyName as EnterpriseName,
                                        CU.UserGuid as LaborGuid,
                                        CU.UserNameCN as LaborName,
                                        LB.BusinessUserGuid as LBBusinessUserGuid,
                                        LB.BusinessUserName as LBBusinessUserName,
                                        LB.ServiceUserGuid as LBServiceUserGuid,
                                        LB.ServiceUserName as LBServiceUserName,
                                        ES.ProviderUserGuid as ESProviderUserGuid,
                                        ES.ProviderUserName as ESProviderUserName,
                                        ES.BusinessUserGuid as ESBusinessUserGuid,
                                        ES.BusinessUserName as ESBusinessUserName

                                from XQYCLaborContract Biz Left Join CoreUser CU ON Biz.LaborUserGuid= CU.UserGuid
                                                           Left Join XQYCLabor LB ON Biz.LaborUserGuid=LB.UserGuid
                                                           Left Join GeneralEnterprise GE On Biz.EnterpriseGuid = GE.EnterpriseGuid
                                                           Left Join XQYCEnterpriseService ES ON GE.EnterpriseGuid = ES.EnterpriseGuid
                                where ES.EnterpriseServiceType= 1 "; //--1表示劳务派遣合作关系
                    if (queryTimeSpanValueStart != DateTimeHelper.Min)
                    {
                        sqlClause += string.Format(" AND LaborContractStartDate >= '{0}' ", queryTimeSpanValueStart);
                    }

                    if (queryTimeSpanValueEnd != DateTimeHelper.Min)
                    {
                        sqlClause += string.Format(" AND LaborContractStartDate <= '{0}' ", queryTimeSpanValueEnd);
                    }
                    break;
                case "jobLeavingTime":
                    sqlClause = @" select  Biz.LaborContractGuid as BizGuid,
                                        '' as SalaryDate,
                                        Biz.EnterpriseGuid as EnterpriseKey,
                                        GE.CompanyName as EnterpriseName,
                                        CU.UserGuid as LaborGuid,
                                        CU.UserNameCN as LaborName,
                                        LB.BusinessUserGuid as LBBusinessUserGuid,
                                        LB.BusinessUserName as LBBusinessUserName,
                                        LB.ServiceUserGuid as LBServiceUserGuid,
                                        LB.ServiceUserName as LBServiceUserName,
                                        ES.ProviderUserGuid as ESProviderUserGuid,
                                        ES.ProviderUserName as ESProviderUserName,
                                        ES.BusinessUserGuid as ESBusinessUserGuid,
                                        ES.BusinessUserName as ESBusinessUserName

                                from XQYCLaborContract Biz Left Join CoreUser CU ON Biz.LaborUserGuid= CU.UserGuid
                                                           Left Join XQYCLabor LB ON Biz.LaborUserGuid=LB.UserGuid
                                                           Left Join GeneralEnterprise GE On Biz.EnterpriseGuid = GE.EnterpriseGuid
                                                           Left Join XQYCEnterpriseService ES ON GE.EnterpriseGuid = ES.EnterpriseGuid
                                where ES.EnterpriseServiceType= 1 "; //--1表示劳务派遣合作关系
                    if (queryTimeSpanValueStart != DateTimeHelper.Min)
                    {
                        sqlClause += string.Format(" AND LaborContractDiscontinueDate >= '{0}' ", queryTimeSpanValueStart);
                    }

                    if (queryTimeSpanValueEnd != DateTimeHelper.Min)
                    {
                        sqlClause += string.Format(" AND LaborContractDiscontinueDate <= '{0}' ", queryTimeSpanValueEnd);
                    }
                    break;
                case "balanceTime":
                default:
                    sqlClause = @" select  Biz.SalarySummaryGuid as BizGuid,
                                        Biz.SalaryDate as SalaryDate,
                                        Biz.EnterpriseKey as EnterpriseKey,
                                        Biz.EnterpriseManageFeeReal as ManageFee,
                                        Biz.EnterpriseGeneralRecruitFeeReal as GeneralRecruitFee,
                                        Biz.EnterpriseOnceRecruitFeeReal as OnceRecruitFee,
                                        GE.CompanyName as EnterpriseName,
                                        CU.UserGuid as LaborGuid,
                                        CU.UserNameCN as LaborName,
                                        LB.BusinessUserGuid as LBBusinessUserGuid,
                                        LB.BusinessUserName as LBBusinessUserName,
                                        LB.ServiceUserGuid as LBServiceUserGuid,
                                        LB.ServiceUserName as LBServiceUserName,
                                        ES.ProviderUserGuid as ESProviderUserGuid,
                                        ES.ProviderUserName as ESProviderUserName,
                                        ES.BusinessUserGuid as ESBusinessUserGuid,
                                        ES.BusinessUserName as ESBusinessUserName
                                from XQYCSalarySummary Biz Left Join CoreUser CU ON Biz.LaborKey= CU.UserGuid
                                                           Left Join XQYCLabor LB ON Biz.LaborKey=LB.UserGuid
                                                           Left Join GeneralEnterprise GE On Biz.EnterpriseKey = GE.EnterpriseGuid
                                                           Left Join XQYCEnterpriseService ES ON GE.EnterpriseGuid = ES.EnterpriseGuid
                                where ES.EnterpriseServiceType= 1 "; //--1表示劳务派遣合作关系
                    if (queryTimeSpanValueStart != DateTimeHelper.Min)
                    {
                        sqlClause += string.Format(" AND EnterpriseManageFeeCashDate >= '{0}' ", queryTimeSpanValueStart);
                    }

                    if (queryTimeSpanValueEnd != DateTimeHelper.Min)
                    {
                        sqlClause += string.Format(" AND EnterpriseManageFeeCashDate <= '{0}' ", queryTimeSpanValueEnd);
                    }
                    break;
            }

            if (dispatchType != DispatchTypes.UnSet)
            {
                sqlClause += string.Format(" AND LB.CurrentDispatchType = {0} ", (int)dispatchType);
            }

            if (GuidHelper.IsInvalidOrEmpty(enterpriseKey) == false)
            {
                sqlClause += string.Format(" AND Biz.EnterpriseKey = '{0}' ", enterpriseKey);
            }

            if (string.IsNullOrWhiteSpace(serviceRoleName) == false && serviceUserGuid != null)
            {
                switch (serviceRoleName.ToLower())
                {
                    case "lbbusiness":
                        sqlClause += string.Format(" AND LB.BusinessUserGuid='{0}' ", serviceUserGuid);
                        break;
                    case "lbservice":
                        sqlClause += string.Format(" AND LB.ServiceUserGuid='{0}' ", serviceUserGuid);
                        break;
                    case "etprovide":
                        sqlClause += string.Format(" AND ES.ProviderUserGuid='{0}' ", serviceUserGuid);
                        break;
                    case "etbusiness":
                    default:
                        sqlClause += string.Format(" AND ES.BusinessUserGuid='{0}' ", serviceUserGuid);
                        break;
                }
            }
            return sqlClause;
        }
Пример #26
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="left">An <see cref="Expression"/> that representts the receiver or static reference for dispatching.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     Expression left,
     String name,
     params Expression[] arguments
 )
 {
     return Dispatch(symbols, dispatchType, left, name, Type.EmptyTypes, arguments);
 }
Пример #27
0
 internal DispatchExpression(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     Expression left,
     String name,
     IList<Type> typeArguments,
     IList<Expression> arguments
 )
     : base(symbols)
 {
     this.DispatchType = dispatchType;
     this.Left = left;
     this.Name = name;
     this.TypeArguments = new ReadOnlyCollection<Type>(typeArguments ?? Type.EmptyTypes);
     this.Arguments = new ReadOnlyCollection<Expression>(arguments ?? Arrays.Empty<Expression>());
     this.SetPosition(arguments.StartWith(left));
 }
Пример #28
0
 /// <summary>
 /// Adds the symbol to this symbol table.
 /// </summary>
 /// <param name="dispatchType">The symbol's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="leftType">The symbol's <see cref="SymbolEntry.LeftType"/>.</param>
 /// <param name="name">The symbol's <see cref="SymbolEntry.Name"/>.</param>
 /// <param name="definition">The <see cref="SymbolDefinition"/> of the symbol.</param>
 public void Add(DispatchTypes dispatchType, Type leftType, String name, SymbolDefinition definition)
 {
     this.Add(new SymbolEntry(dispatchType, leftType, name), definition);
 }
Пример #29
0
 /// <summary>
 /// Gets the symbol from this symbol table's <see cref="Chain"/> with the specified symbol key properties.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns>The symbol value with the specified symbol key properties.</returns>
 public SymbolDefinition Resolve(DispatchTypes dispatchType, String name)
 {
     return(this.Resolve(dispatchType, null, name));
 }
Пример #30
0
 /// <summary>
 /// Initializes a new instance of <see cref="SymbolEntry"/>.
 /// </summary>
 /// <param name="dispatchType">The target <see cref="DispatchTypes"/> of this symbol.</param>
 /// <param name="name">The name of this symbol.</param>
 public SymbolEntry(DispatchTypes dispatchType, String name)
     : this(dispatchType, null, name)
 {
 }
Пример #31
0
 /// <summary>
 /// Gets the symbol from this symbol table's <see cref="Chain"/> with the specified symbol key properties.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="leftType">The key's <see cref="SymbolEntry.LeftType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <param name="value">When this method returns, contains the value associated with the specified symbol key properties, if the key is found;
 /// otherwise, <c>null</c>. This parameter is passed uninitialized.</param>
 /// <returns><c>true</c> if the specified symbol key is contained in this symbol table's <see cref="Chain"/>; otherwise, <c>false</c>.</returns>
 public Boolean TryResolve(DispatchTypes dispatchType, Type leftType, String name, out SymbolDefinition value)
 {
     return(this.TryResolve(new SymbolEntry(dispatchType, leftType, name), out value));
 }
Пример #32
0
 /// <summary>
 /// Gets the symbol from this symbol table's <see cref="Chain"/> with the specified symbol key properties.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <param name="value">When this method returns, contains the value associated with the specified symbol key properties, if the key is found;
 /// otherwise, <c>null</c>. This parameter is passed uninitialized.</param>
 /// <returns><c>true</c> if the specified symbol key is contained in this symbol table's <see cref="Chain"/>; otherwise, <c>false</c>.</returns>
 public Boolean TryResolve(DispatchTypes dispatchType, String name, out SymbolDefinition value)
 {
     return(this.TryResolve(dispatchType, null, name, out value));
 }
Пример #33
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="left">An <see cref="Expression"/> that representts the receiver or static reference for dispatching.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="typeArguments">A sequence of <see cref="Type"/> objects that represents the type arguments for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     Expression left,
     String name,
     IEnumerable<Type> typeArguments,
     params Expression[] arguments
 )
 {
     return new DispatchExpression(
         symbols,
         dispatchType,
         left,
         name,
         typeArguments != null ? typeArguments.ToArray() : Type.EmptyTypes,
         arguments
     );
 }
Пример #34
0
 /// <summary>
 /// Gets the most appropriate symbol with the specified symbol key properties.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="leftType">The key's <see cref="SymbolEntry.LeftType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns>The symbol value with the most appropriate to the specified symbol key properties.</returns>
 public SymbolDefinition Match(DispatchTypes dispatchType, Type leftType, String name)
 {
     return(this.Match(new SymbolEntry(dispatchType, leftType, name)));
 }
Пример #35
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     String name,
     params Expression[] arguments
 )
 {
     return Dispatch(symbols, dispatchType, null, name, arguments);
 }
Пример #36
0
 /// <summary>
 /// Gets the most appropriate symbol with the specified symbol key properties.
 /// </summary>
 /// <param name="dispatchType">The key's <see cref="SymbolEntry.DispatchType"/>.</param>
 /// <param name="name">The key's <see cref="SymbolEntry.Name"/>.</param>
 /// <returns>The symbol value with the most appropriate to the specified symbol key properties.</returns>
 public SymbolDefinition Match(DispatchTypes dispatchType, String name)
 {
     return(this.Match(dispatchType, null, name));
 }
Пример #37
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="symbols">The symbol table for the expression.</param>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">A sequence of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     SymbolTable symbols,
     DispatchTypes dispatchType,
     String name,
     IEnumerable<Expression> arguments
 )
 {
     return Dispatch(symbols, dispatchType, null, name, arguments);
 }
Пример #38
0
 /// <summary>
 /// Initializes a new instance of <see cref="YacqSymbolAttribute"/> class.
 /// </summary>
 /// <param name="dispatchType">The target <see cref="DispatchTypes"/> of this symbol.</param>
 /// <param name="leftType">The target of this symbol.</param>
 /// <param name="name">The name of this symbol.</param>
 public YacqSymbolAttribute(DispatchTypes dispatchType, Type leftType, String name)
 {
     this.DispatchType = dispatchType;
     this.LeftType = leftType;
     this.Name = name;
 }
Пример #39
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">An array of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     DispatchTypes dispatchType,
     String name,
     params Expression[] arguments
 )
 {
     return Dispatch(null, dispatchType, name, arguments);
 }
Пример #40
0
 /// <summary>
 /// Initializes a new instance of <see cref="YacqSymbolAttribute"/> class.
 /// </summary>
 /// <param name="dispatchType">The target <see cref="DispatchTypes"/> of this symbol.</param>
 /// <param name="name">The name of this symbol.</param>
 public YacqSymbolAttribute(DispatchTypes dispatchType, String name)
     : this(dispatchType, null, name)
 {
 }
Пример #41
0
 /// <summary>
 /// Creates a <see cref="DispatchExpression"/> that represents the dispatching, member reference or method calls.
 /// </summary>
 /// <param name="dispatchType">The dispatching type.</param>
 /// <param name="name">The name to use for dispatching.</param>
 /// <param name="arguments">A sequence of <see cref="Expression"/> objects that represents the arguments for dispatching.</param>
 /// <returns>An <see cref="DispatchExpression"/> that has the properties set to the specified values.</returns>
 public static DispatchExpression Dispatch(
     DispatchTypes dispatchType,
     String name,
     IEnumerable<Expression> arguments
 )
 {
     return Dispatch(null, dispatchType, name, arguments);
 }
Пример #42
0
 /// <summary>
 /// Initializes a new instance of <see cref="YacqSymbolAttribute"/> class.
 /// </summary>
 /// <param name="dispatchType">The target <see cref="DispatchTypes"/> of this symbol.</param>
 /// <param name="leftType">The target of this symbol.</param>
 /// <param name="name">The name of this symbol.</param>
 public YacqSymbolAttribute(DispatchTypes dispatchType, Type leftType, String name)
 {
     this.DispatchType = dispatchType;
     this.LeftType     = leftType;
     this.Name         = name;
 }