private void AddSecurityConfiguration()
        {
            try
            {
                Type         t       = typeof(Amdocs.Ginger.CoreNET.ValueExpression.ValueExpessionGeneralFunctions);
                MemberInfo[] members = t.GetMembers();
                ValueExpressionFunctionAttribute token = null;

                foreach (MemberInfo mi in members)
                {
                    token = Attribute.GetCustomAttribute(mi, typeof(ValueExpressionFunctionAttribute), false) as ValueExpressionFunctionAttribute;
                    ValueExpressionFunctionDescription desc        = Attribute.GetCustomAttribute(mi, typeof(ValueExpressionFunctionDescription), false) as ValueExpressionFunctionDescription;
                    ValueExpressionFunctionExpression  expr        = Attribute.GetCustomAttribute(mi, typeof(ValueExpressionFunctionExpression), false) as ValueExpressionFunctionExpression;
                    ValueExpressionFunctionCategory    Category    = Attribute.GetCustomAttribute(mi, typeof(ValueExpressionFunctionCategory), false) as ValueExpressionFunctionCategory;
                    ValueExpressionFunctionSubCategory SubCategory = Attribute.GetCustomAttribute(mi, typeof(ValueExpressionFunctionSubCategory), false) as ValueExpressionFunctionSubCategory;
                    if (token == null)
                    {
                        continue;
                    }
                    TreeViewItem Parent = AddOrGetCategory(Category.DefaultValue);
                    TreeViewItem child  = AddOrGetSubCategory(SubCategory.DefaultValue, Parent);
                    child.Selected += CleanHelpText;
                    AddWSSecurityConfig(child, desc.DefaultValue, expr.DefaultValue, SubCategory.DefaultValue);
                }
            }
            catch (Exception ex)
            {
                Reporter.ToLog(eLogLevel.ERROR, "Add Security Configuration Failed: ", ex);
            }
        }
Ejemplo n.º 2
0
        private void AddSecurityConfiguration()
        {
            TreeViewItem tviSecuritySettings = new TreeViewItem();

            SetItemView(tviSecuritySettings, "General Functions", "", "@Config_16x16.png");
            tviSecuritySettings.Selected += HideHelp;
            xObjectsTreeView.Items.Add(tviSecuritySettings);
            try
            {
                Type         t       = typeof(Amdocs.Ginger.CoreNET.ValueExpression.ValueExpessionGeneralFunctions);
                MemberInfo[] members = t.GetMembers();
                ValueExpressionFunctionAttribute token = null;

                foreach (MemberInfo mi in members)
                {
                    token = Attribute.GetCustomAttribute(mi, typeof(ValueExpressionFunctionAttribute), false) as ValueExpressionFunctionAttribute;
                    ValueExpressionFunctionDescription desc = Attribute.GetCustomAttribute(mi, typeof(ValueExpressionFunctionDescription), false) as ValueExpressionFunctionDescription;
                    ValueExpressionFunctionExpression  expr = Attribute.GetCustomAttribute(mi, typeof(ValueExpressionFunctionExpression), false) as ValueExpressionFunctionExpression;
                    if (token == null)
                    {
                        continue;
                    }

                    AddWSSecurityConfig(tviSecuritySettings, desc.DefaultValue, expr.DefaultValue); //GetUTCDateTimeStamp());
                }
            }
            catch (Exception ex)
            {
                Reporter.ToLog(eLogLevel.ERROR, "Add Security Configuration Failed: ", ex);
            }
        }