private void AddSecurityConfiguration() { TreeViewItem tviSecuritySettings = new TreeViewItem(); SetItemView(tviSecuritySettings, "General Functions", "", "@Config_16x16.png"); 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(eAppReporterLogLevel.ERROR, "Add Security Configuration Failed: ", ex); } }
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); } }