コード例 #1
0
        public TransactionMsg transfer(transfers value)
        {
            dwacc ob4 = new dwacc {
                AccountId = value.source_accid, Balance = value.amount
            };
            TransactionMsg ob      = new TransactionMsg();
            string         data    = JsonConvert.SerializeObject(ob4);
            StringContent  content = new StringContent(data, Encoding.UTF8, "application/json");

            HttpResponseMessage response = client.PostAsync(client.BaseAddress + "/Rules/evaluateMinBal/", content).Result;

            if (response.IsSuccessStatusCode)
            {
                string     data1 = response.Content.ReadAsStringAsync().Result;
                RuleStatus s1    = JsonConvert.DeserializeObject <RuleStatus>(data1);
                if (s1.Message == "Warning")
                {
                    ob.Message = "Warning";
                    return(ob);
                }
                ob.Message = "No Warning";
                return(ob);
            }



            return(null);
        }
コード例 #2
0
 private void method_4()
 {
     if (!this.bool_0)
     {
         RuleStatus ruleStatus = RuleStatus.None;
         foreach (RuleCategory current in this.bindingCollection_0)
         {
             if (!(current.Active == false) && ruleStatus < current.Status)
             {
                 ruleStatus = current.Status;
             }
         }
         foreach (Rule current2 in this.bindingCollection_1)
         {
             if (current2.Active && ruleStatus < current2.Status)
             {
                 ruleStatus = current2.Status;
             }
         }
         if (this.ruleStatus_0 != ruleStatus)
         {
             this.ruleStatus_0 = ruleStatus;
             this.method_10("Status");
         }
     }
 }
コード例 #3
0
        public RuleStatus rulesStatus(int AccountId, int amount, Account account)
        {
            try
            {
                Clients    ruleClient = new Clients();
                HttpClient client     = ruleClient.RuleApi();

                int balance = account.Balance - amount;
                HttpResponseMessage response = client.GetAsync("api/Rules/EvaluateMinBal/" + AccountId + "/" + balance).Result;
                if (response.StatusCode == System.Net.HttpStatusCode.InternalServerError)
                {
                    return(new RuleStatus {
                        status = "denied"
                    });
                }
                var        result     = response.Content.ReadAsStringAsync().Result;
                RuleStatus rulestatus = JsonConvert.DeserializeObject <RuleStatus>(result);
                return(rulestatus);
            }
            catch (Exception e)
            {
                _log4net.Error("Insufficient Balance for account Id: " + AccountId);
                throw e;
            }
        }
コード例 #4
0
        public TransactionMsg withdraw(dwacc value)
        {
            TransactionMsg ob      = new TransactionMsg();
            string         data    = JsonConvert.SerializeObject(value);
            StringContent  content = new StringContent(data, Encoding.UTF8, "application/json");

            HttpResponseMessage response = client.PostAsync(client.BaseAddress + "/Rules/evaluateMinBal/", content).Result;

            if (response.IsSuccessStatusCode)
            {
                string     data1 = response.Content.ReadAsStringAsync().Result;
                RuleStatus s1    = JsonConvert.DeserializeObject <RuleStatus>(data1);
                if (s1.Message == "Warning")
                {
                    ob.Message = "Warning";
                    return(ob);
                }
                ob.Message = "No Warning";
                return(ob);
            }



            return(null);
        }
コード例 #5
0
 public static void AddRule(this List <CaseSelectRule> rules, string name, RuleStatus status = RuleStatus.Selected)
 {
     rules.Add(new CaseSelectRule()
     {
         Name = name, Status = status
     });
 }
コード例 #6
0
ファイル: ACountingRule.cs プロジェクト: zhuzhu007/CodingTest
 protected void ValidateFilters(int num)
 {
     if (num > 0 && (Filters == null || !Filters.Any()))
     {
         _ruleStatus = RuleStatus.Stopped;
         return;
     }
     if (num == 0 && (Filters != null || Filters.Any()))
     {
         _ruleStatus = RuleStatus.Stopped;
         return;
     }
     if (num > 0 && Filters != null && Filters.Count != num)
     {
         _ruleStatus = RuleStatus.Stopped;
         return;
     }
     if (Filters != null && Filters.Any())
     {
         foreach (var filter in Filters)
         {
             if (string.IsNullOrEmpty(filter.Name) || filter.Values == null || !filter.Values.Any())
             {
                 _ruleStatus = RuleStatus.Stopped;
                 return;
             }
         }
     }
 }
コード例 #7
0
        public IActionResult transfer([FromBody] dynamic model)
        {
            if (Convert.ToInt32(model.Source_AccountId) == 0 || Convert.ToInt32(model.Target_AccountId) == 0 || Convert.ToInt32(model.amount) == 0)
            {
                _log4net.Info("Invalid SourceAccountId or TargetAccountId or amount");
                return(NotFound(new TransactionStatus()
                {
                    message = "Transfer Not Allowed"
                }));
            }

            try
            {
                TransactionStatus statusfinal = new TransactionStatus();
                statusfinal.message = "Transaction Not Allowed";
                Account    account    = _provider.GetAccount(Convert.ToInt32(model.Source_AccountId));
                RuleStatus rulestatus = _provider.KnowRuleStatus(Convert.ToInt32(model.Source_AccountId), Convert.ToInt32(model.amount), account);
                if (rulestatus.Status == "allowed")
                {
                    statusfinal.message = "Transfered from Account no. " + model.Source_AccountId + " To Account no. " + model.Target_AccountId;

                    TransactionStatus status = _provider.Withdraw(Convert.ToInt32(model.Source_AccountId), Convert.ToInt32(model.amount));

                    if (status.message == null)
                    {
                        return(NotFound(new TransactionStatus()
                        {
                            message = "Record Not Found"
                        }));
                    }

                    _provider.AddToTransactionHistory(status, account);
                    statusfinal.source_balance = status.destination_balance;


                    account = _provider.GetAccount(Convert.ToInt32(model.Target_AccountId));
                    status  = _provider.Deposit(Convert.ToInt32(model.Target_AccountId), Convert.ToInt32(model.amount));

                    if (status.message == null)
                    {
                        return(NotFound(new TransactionStatus()
                        {
                            message = "Record Not Found"
                        }));
                    }

                    _provider.AddToTransactionHistory(status, account);
                    statusfinal.destination_balance = status.destination_balance;
                    _log4net.Info("Transfer done from Account Id: " + Convert.ToInt32(model.Source_AccountId) + "to Account Id" + Convert.ToInt32(model.Target_AccountId));
                    return(Ok(statusfinal));
                }
                return(NotFound());
            }
            catch (Exception e)
            {
                _log4net.Error(e.Message + ": In Trasaction Controller");
                throw e;
            }
        }
コード例 #8
0
ファイル: Rule.cs プロジェクト: killbug2004/WSProf
        /// <summary>
		/// Constructs a NEW Rule from an existing object
		/// </summary>
		/// <param name="rule"></param>
		public Rule(Rule rule) 
            : base(rule)
		{
            if (rule == null)
                throw new Workshare.Policy.Exceptions.ArgumentNullException("rule", "Input rule is null", null);
            
            m_status = rule.Status;
		}
コード例 #9
0
        public TransactionStatus transfer(int Source_AccountId, int Target_AccountId, int amount)
        {
            try
            {
                TransactionStatus transferstatus = new TransactionStatus();
                //if (Source_AccountId < 0 || Target_AccountId < 0 || amount < 0)
                //{
                //    _log4net.Error("invalid parameters");
                //    return new TransactionStatus() { message = "Transfer Not Allowed" };
                //}
                Account    account    = getAccount(Source_AccountId);
                RuleStatus ruleStatus = rulesStatus(Source_AccountId, amount, account);
                if (ruleStatus.status == "allowed")
                {
                    TransactionStatus status = withdraw(Source_AccountId, amount);
                    if (status.message == null)
                    {
                        return(new TransactionStatus()
                        {
                            message = "Unable to withdraw from source id" + Source_AccountId
                        });
                    }
                    addToTransactionHistory(status, account);
                    transferstatus.source_balance = status.destination_balance;


                    Account           targetAccount = getAccount(Target_AccountId);
                    TransactionStatus targetStatus  = deposit(Target_AccountId, amount);

                    if (status.message == null)
                    {
                        return(new TransactionStatus()
                        {
                            message = "Unable to deposit into target account " + Target_AccountId
                        });
                    }
                    addToTransactionHistory(targetStatus, targetAccount);
                    transferstatus.destination_balance = targetStatus.destination_balance;
                    transferstatus.message             = "Tranferred " + amount + " from account " + Source_AccountId + " to Account " + Target_AccountId;
                    _log4net.Info("Transfer  from Account Id: " + Source_AccountId + "to Account Id" + Target_AccountId + " Completed Successfully");
                    return(transferstatus);
                }
                return(new TransactionStatus()
                {
                    message = "Unable to transfer into target account " + Target_AccountId
                });
            }
            catch (ArgumentNullException e)
            {
                _log4net.Error(e.Message);
                throw e;
            }
            catch (Exception e)
            {
                _log4net.Error(e.Message);
                throw e;
            }
        }
コード例 #10
0
ファイル: PolicyRule.cs プロジェクト: killbug2004/WSProf
        public PolicyRule(IPolicyStore policyStore, IPolicy policy, Guid guid, string name, RuleStatus status, bool readOnly)
            : base(guid, name, status, readOnly)
        {
            if (policyStore == null)
                throw new Workshare.Policy.Exceptions.ArgumentNullException("policyStore", "Input policy store is null", null);

            m_store = policyStore;
            SetPolicy(policy);
        }
コード例 #11
0
        public void EvaluateMinBal_InValidInput_int()
        {
            var        result = _rulesController.EvaluateMinBal(2, 500);
            RuleStatus status = new RuleStatus {
                Status = "denied"
            };

            Assert.AreEqual(result.Status, status.Status);
        }
コード例 #12
0
        private static bool AddWindowsFirewallEntry(string appPath)
        {
            switch (Environment.OSVersion.Platform)
            {
            case PlatformID.Win32NT:
                if (Environment.OSVersion.Version.Major > 5)
                {
                    //vista and above
                    try
                    {
                        RuleStatus status = WindowsFirewall.RuleExistsVista("", appPath);

                        switch (status)
                        {
                        case RuleStatus.Blocked:
                        case RuleStatus.Disabled:
                            WindowsFirewall.RemoveRuleVista("", appPath);
                            break;

                        case RuleStatus.Allowed:
                            return(true);
                        }

                        WindowsFirewall.AddRuleVista("Technitium DNS Server", "Allow incoming connection request to the DNS server.", FirewallAction.Allow, appPath, Protocol.ANY, null, null, null, null, InterfaceTypeFlags.All, true, Direction.Inbound, true);
                        return(true);
                    }
                    catch
                    { }
                }
                else
                {
                    try
                    {
                        RuleStatus status = WindowsFirewall.ApplicationExists(appPath);

                        switch (status)
                        {
                        case RuleStatus.Disabled:
                            WindowsFirewall.RemoveApplication(appPath);
                            break;

                        case RuleStatus.Allowed:
                            return(true);
                        }

                        WindowsFirewall.AddApplication("Technitium DNS Server", appPath);
                        return(true);
                    }
                    catch
                    { }
                }

                break;
            }

            return(false);
        }
コード例 #13
0
        /// <summary>
        /// TryParseEnum does not exist in .net 2.0. But we need to support .net 2.0
        /// </summary>
        /// <param name="value">The string value to parse from.</param>
        /// <param name="status">The parsed value </param>
        /// <returns>True: the parse succeeds; False: the parse fails</returns>
        private bool TryParseEnum(string value, out RuleStatus status)
        {
            if (!Enum.IsDefined(typeof(RuleStatus), value))
            {
                status = RuleStatus.Disabled;
                return(false);
            }

            status = (RuleStatus)Enum.Parse(typeof(RuleStatus), value);
            return(true);
        }
コード例 #14
0
        public virtual Task UpdateStatusAsync(Guid id, RuleStatus status, CancellationToken cancellationToken)
        {
            this.update(id,
                        (old) =>
            {
                old.Status = status;
                return(old);
            }
                        );

            return(Task.CompletedTask);
        }
コード例 #15
0
        public IActionResult withdraw([FromBody] dynamic model)
        {
            if (Convert.ToInt32(model.AccountId) == 0 || Convert.ToInt32(model.amount) == 0)
            {
                _log4net.Info("Either AccountId or amount is invalid");
                return(NotFound(new TransactionStatus()
                {
                    message = "Withdraw Not Allowed"
                }));
            }

            try
            {
                Account account = _provider.GetAccount(Convert.ToInt32(model.AccountId));

                RuleStatus rulestatus = _provider.KnowRuleStatus(Convert.ToInt32(model.AccountId), Convert.ToInt32(model.amount), account);


                if (rulestatus.Status == "allowed")
                {
                    _log4net.Info("withdraw Api called");


                    TransactionStatus status = _provider.Withdraw(Convert.ToInt32(model.AccountId), Convert.ToInt32(model.amount));

                    if (status.message == null)
                    {
                        return(NotFound(new TransactionStatus()
                        {
                            message = "Record Not Found"
                        }));
                    }

                    _provider.AddToTransactionHistory(status, account);
                    _log4net.Info("Withdraw done for Account Id: " + Convert.ToInt32(model.AccountId));
                    return(Ok(status));
                }
                return(NotFound(new TransactionStatus()
                {
                    message = "Withdraw Not Allowed"
                }));
            }
            catch (ArgumentNullException e)
            {
                _log4net.Error(e.Message);
                return(StatusCode(500));
            }
            catch (Exception e)
            {
                _log4net.Error(e.Message + ": In Trasaction Controller");
                return(StatusCode(500));
            }
        }
コード例 #16
0
        private static void AddWindowsFirewallEntry(string appPath)
        {
            switch (Environment.OSVersion.Platform)
            {
            case PlatformID.Win32NT:
                if (Environment.OSVersion.Version.Major > 5)
                {
                    //vista and above
                    try
                    {
                        RuleStatus status = WindowsFirewall.RuleExistsVista("", appPath);

                        switch (status)
                        {
                        case RuleStatus.Blocked:
                        case RuleStatus.Disabled:
                            WindowsFirewall.RemoveRuleVista("", appPath);
                            break;

                        case RuleStatus.Allowed:
                            return;
                        }

                        WindowsFirewall.AddRuleVista("Bit Chat", "Allow incoming connection request to Bit Chat application.", FirewallAction.Allow, appPath, Protocol.ANY);
                    }
                    catch
                    { }
                }
                else
                {
                    try
                    {
                        RuleStatus status = WindowsFirewall.ApplicationExists(appPath);

                        switch (status)
                        {
                        case RuleStatus.Disabled:
                            WindowsFirewall.RemoveApplication(appPath);
                            break;

                        case RuleStatus.Allowed:
                            return;
                        }

                        WindowsFirewall.AddApplication("Bit Chat", appPath);
                    }
                    catch
                    { }
                }

                break;
            }
        }
コード例 #17
0
        public ActionResult withdraw([FromBody] dynamic model)
        {
            int AccountId = Convert.ToInt16(model.AccountId);
            int amount    = Convert.ToInt16(model.amount);

            try
            {
                TransactionStatus withdrawStatus = new TransactionStatus();
                if (AccountId <= 0 || amount < 0)
                {
                    _log4net.Error("Account Id" + AccountId + " or Amount" + amount + " is Invalid");
                    return(BadRequest(new TransactionStatus()
                    {
                        message = "Deposit Not Allowed"
                    }));
                }
                _log4net.Info("Calling Account Api......for account id " + AccountId);


                Account account = _provider.getAccount(AccountId);
                _log4net.Info("Evaluating Min Balance for " + account.AccountId);
                RuleStatus ruleStatus = _provider.rulesStatus(AccountId, amount, account);

                if (ruleStatus.status == "allowed")
                {
                    withdrawStatus = _provider.withdraw(AccountId, amount);
                    if (withdrawStatus.message == null)
                    {
                        _log4net.Error("Unable to withdraw");
                        return(NotFound(new TransactionStatus()
                        {
                            message = "Record Not Found"
                        }));
                    }
                    _provider.addToTransactionHistory(withdrawStatus, account);
                }
                return(Ok(withdrawStatus));
            }
            catch (ArgumentNullException e)
            {
                _log4net.Error(e.Message);
                return(StatusCode(500));
            }
            catch (Exception e)
            {
                _log4net.Error(e.Message + ": In Trasaction Controller");
                return(StatusCode(500));
            }
        }
コード例 #18
0
        public async Task UpdateStatusAsync(Guid id, RuleStatus status, CancellationToken cancellationToken)
        {
            using (var db = this.db.CreateDbContext())
            {
                var rule = await db.TransactionConfirmationWatcherRules
                           .FirstOrDefaultAsync(c => c.Id == id, cancellationToken);

                if (rule == null)
                {
                    throw new KeyNotFoundException("The rule id is not found.");
                }

                rule.Status = (int)status;

                await db.SaveChangesAsync(cancellationToken);
            }
        }
コード例 #19
0
        public override string GetType(int script, RuleStatus ruleStatus)
        {
            switch (ruleStatus)
            {
            case RuleStatus.WordIdeo:
                return(WORD_IDEO);

            case RuleStatus.WordKana:     //RuleBasedBreakIterator.WORD_KANA:
                return(script == UScript.Hiragana ? WORD_HIRAGANA : WORD_KATAKANA);

            case RuleStatus.WordLetter:     //RuleBasedBreakIterator.WORD_LETTER:
                return(script == UScript.Hangul ? WORD_HANGUL : WORD_LETTER);

            case RuleStatus.WordNumber:     //RuleBasedBreakIterator.WORD_NUMBER:
                return(WORD_NUMBER);

            default:     /* some other custom code */
                return("<OTHER>");
            }
        }
コード例 #20
0
        private bool AddWindowsFirewallEntry(string appPath)
        {
            try
            {
                RuleStatus status = WindowsFirewall.RuleExistsVista("", appPath);

                switch (status)
                {
                case RuleStatus.Blocked:
                case RuleStatus.Disabled:
                    WindowsFirewall.RemoveRuleVista("", appPath);
                    break;

                case RuleStatus.Allowed:
                    return(true);
                }

                WindowsFirewall.AddRuleVista("Technitium DNS Server", "Allows incoming connection request to the DNS server.", FirewallAction.Allow, appPath, Protocol.ANY, null, null, null, null, InterfaceTypeFlags.All, true, Direction.Inbound, true);

                //add web console rule
                try
                {
                    WindowsFirewall.RemoveRuleVista("Technitium DNS Server Web Console", "");
                }
                catch
                { }

                try
                {
                    WindowsFirewall.AddRuleVista("Technitium DNS Server Web Console", "Allows access to the DNS server web console.", FirewallAction.Allow, null, Protocol.TCP, _service.WebServiceHttpPort + ", " + _service.WebServiceTlsPort, null, null, null, InterfaceTypeFlags.All, true, Direction.Inbound, true);
                }
                catch
                { }

                return(true);
            }
            catch
            {
                return(false);
            }
        }
コード例 #21
0
        /// <summary>
        /// Here we are calling Rule api to know whether we can actually
        /// withdraw from an account means balance is sufficient or not
        /// </summary>
        /// <param name="AccountId"></param>
        /// <param name="amount"></param>
        /// <param name="account"></param>
        /// <returns></returns>
        public RuleStatus KnowRuleStatus(int AccountId, int amount, Account account)
        {
            RuleStatus rulestatus = new RuleStatus();

            try
            {
                Client              obj      = new Client();
                HttpClient          client   = obj.RuleApi();
                int                 balance  = account.Balance - amount;
                HttpResponseMessage response = client.GetAsync("api/Rules/EvaluateMinBal/" + AccountId + "/" + balance).Result;
                var                 result   = response.Content.ReadAsStringAsync().Result;
                rulestatus = JsonConvert.DeserializeObject <RuleStatus>(result);
            }
            catch (Exception e)
            {
                _log4net.Error("Insufficient Balance for account Id: " + AccountId);
                throw e;
            }

            return(rulestatus);
        }
コード例 #22
0
ファイル: PolicyRule.cs プロジェクト: killbug2004/WSProf
 public PolicyRule(IPolicy policy, Guid guid, string name, RuleStatus status)
     : base(guid, name, status)
 {
     SetPolicy(policy);
 }
コード例 #23
0
ファイル: Rule.cs プロジェクト: killbug2004/WSProf
		/// <summary>
		/// Constructs a new Rule object as a NEW object
		/// </summary>
		/// <param name="name"></param>
		/// <param name="status"></param>
		public Rule(Guid guid, string name, RuleStatus status) 
            : base(guid, name)
		{
			m_status = status;
		}
コード例 #24
0
		private void method_4()
		{
			if (!this.bool_0)
			{
				RuleStatus ruleStatus = RuleStatus.None;
				foreach (RuleCategory current in this.bindingCollection_0)
				{
					if (!(current.Active == false) && ruleStatus < current.Status)
					{
						ruleStatus = current.Status;
					}
				}
				foreach (Rule current2 in this.bindingCollection_1)
				{
					if (current2.Active && ruleStatus < current2.Status)
					{
						ruleStatus = current2.Status;
					}
				}
				if (this.ruleStatus_0 != ruleStatus)
				{
					this.ruleStatus_0 = ruleStatus;
					this.method_10("Status");
				}
			}
		}
コード例 #25
0
ファイル: Rule.cs プロジェクト: killbug2004/WSProf
 /// <summary>
 /// Constructs a new Rule object as a NEW object
 /// </summary>
 /// <param name="name"></param>
 /// <param name="status"></param>
 public Rule(Guid guid, string name, RuleStatus status, bool readOnly)
     : base(guid, name, readOnly)
 {
     m_status = status;
 }
コード例 #26
0
ファイル: Rule.cs プロジェクト: killbug2004/WSProf
 public Rule(IRule rhs, bool readOnly)
     : base(rhs, readOnly)
 {
     m_status = rhs.Status;
 }
コード例 #27
0
ファイル: HtmlReporter.cs プロジェクト: rssvihla/OldIdeas
 private string BuildResult(RuleStatus status )
 {
     string firstpart = "<span class=\"";
     string lastpart = "\">"+ status.DisplayName;
     if (status == RuleStatus.Pending)
         return firstpart + "pending"+lastpart;
     if (status == RuleStatus.Passed)
         return firstpart + "success"+lastpart;
     return firstpart + "failed" + lastpart;
 }
コード例 #28
0
 /// <summary>
 /// Return a token type value for a given script and BreakIterator rule status.
 /// </summary>
 public abstract string GetType(int script, RuleStatus ruleStatus);
コード例 #29
0
        private static int Main(string[] args)
        {
            LicenseManager.Validate(typeof(ConsoleMain));
            int result;

            try
            {
                if (ConsoleMain.func_0 == null)
                {
                    ConsoleMain.func_0 = new Func <string, bool>(ConsoleMain.smethod_4);
                }
                IEnumerable <string> source = args.Where(ConsoleMain.func_0);
                if (source.Count <string>() == 0)
                {
                    Console.WriteLine("Error: No Nitriq Project File (*.nitriqProj) was supplied as an argument");
                    result = 1;
                }
                else if (source.Count <string>() > 1)
                {
                    Console.WriteLine("Error: More than one Nitriq Project File (*.nitriqProj) was supplied as an argument");
                    result = 1;
                }
                else
                {
                    string text = source.First <string>();
                    if (!System.IO.File.Exists(text))
                    {
                        Console.WriteLine("Error: Nitriq Project File (*.nitriqProj) does not exist: " + text);
                        result = 1;
                    }
                    else
                    {
                        if (ConsoleMain.func_1 == null)
                        {
                            ConsoleMain.func_1 = new Func <string, bool>(ConsoleMain.smethod_5);
                        }
                        IEnumerable <string> source2 = args.Where(ConsoleMain.func_1);
                        if (source2.Count <string>() == 0)
                        {
                            Console.WriteLine("Error: No Nitriq Query File (*.nq) was supplied as an argument");
                            result = 1;
                        }
                        else if (source2.Count <string>() > 1)
                        {
                            Console.WriteLine("Error: More than one Nitriq Queries File (*.nq) was supplied as an argument");
                            result = 1;
                        }
                        else
                        {
                            string text2 = source2.First <string>();
                            if (!System.IO.File.Exists(text2))
                            {
                                Console.WriteLine("Error: Nitriq Queries File (*.nq) does not exist: " + text2);
                                result = 1;
                            }
                            else
                            {
                                if (ConsoleMain.func_2 == null)
                                {
                                    ConsoleMain.func_2 = new Func <string, bool>(ConsoleMain.smethod_6);
                                }
                                IEnumerable <string> source3 = args.Where(ConsoleMain.func_2);
                                if (source3.Count <string>() == 0)
                                {
                                    Console.WriteLine("Error: No Output File (*.html) was supplied as an argument");
                                    result = 1;
                                }
                                else if (source3.Count <string>() > 1)
                                {
                                    Console.WriteLine("Error: More than one Output File (*.html) was supplied as an argument");
                                    result = 1;
                                }
                                else
                                {
                                    string path = source3.First <string>();
                                    if (ConsoleMain.func_3 == null)
                                    {
                                        ConsoleMain.func_3 = new Func <string, bool>(ConsoleMain.smethod_7);
                                    }
                                    bool              flag              = args.Where(ConsoleMain.func_3).Any <string>();
                                    StringBuilder     stringBuilder     = new StringBuilder();
                                    StringBuilder     stringBuilder2    = new StringBuilder("<ul id=\"toc\">\r\n");
                                    MainViewModelBase mainViewModelBase = new MainViewModelBase();
                                    mainViewModelBase.method_0(text2);
                                    IEnumerable <AssemblyFileInfo> enumerable = ConsoleMain.smethod_1(text);
                                    MainViewModelBase arg_211_0 = mainViewModelBase;
                                    IEnumerable <AssemblyFileInfo> arg_207_0 = enumerable;
                                    if (ConsoleMain.func_4 == null)
                                    {
                                        ConsoleMain.func_4 = new Func <AssemblyFileInfo, string>(ConsoleMain.smethod_8);
                                    }
                                    arg_211_0.Files = new List <string>(arg_207_0.Select(ConsoleMain.func_4));
                                    mainViewModelBase.method_10(new List <AssemblyFileInfo>(enumerable));
                                    Dictionary <string, AssemblyTuple> nameToAssemblyTuple = BfCache.smethod_1(enumerable);
                                    mainViewModelBase.method_6(new BfCache(nameToAssemblyTuple));
                                    int num  = 0;
                                    int num2 = 0;
                                    foreach (Rule current in mainViewModelBase.RuleSet.RulesEnumerator())
                                    {
                                        if (current.Active)
                                        {
                                            mainViewModelBase.method_14(current, true);
                                            if (current.QueryResults.Problems.Count > 0)
                                            {
                                                stringBuilder.AppendLine(string.Concat(new string[]
                                                {
                                                    "<h2><a name=\"",
                                                    current.Name,
                                                    "\" />The Query \"",
                                                    current.Name,
                                                    "\" has the following problems: </h2>"
                                                }));
                                            }
                                            else
                                            {
                                                stringBuilder.AppendLine(string.Concat(new string[]
                                                {
                                                    "<h2><a name=\"",
                                                    current.Name,
                                                    "\" />The Query \"",
                                                    current.Name,
                                                    "\" returned the following results: </h2>"
                                                }));
                                            }
                                            RuleStatus ruleStatus = RuleStatus.Good;
                                            foreach (Problem current2 in current.QueryResults.Problems)
                                            {
                                                if (current2.ProblemType == RuleStatus.Warning)
                                                {
                                                    num++;
                                                    stringBuilder.AppendLine("<h3>Warning: " + ConsoleMain.smethod_0(current2.Description) + "</h3>");
                                                    if (ruleStatus == RuleStatus.Good)
                                                    {
                                                        ruleStatus = RuleStatus.Warning;
                                                    }
                                                }
                                                else if (current2.ProblemType == RuleStatus.Error)
                                                {
                                                    num2++;
                                                    stringBuilder.AppendLine("<h3>Error: " + ConsoleMain.smethod_0(current2.Description) + "</h3>");
                                                    if (ruleStatus == RuleStatus.Good || ruleStatus == RuleStatus.Warning)
                                                    {
                                                        ruleStatus = RuleStatus.Error;
                                                    }
                                                }
                                                else if (current2.ProblemType == RuleStatus.CompileError)
                                                {
                                                    num2++;
                                                    stringBuilder.AppendLine("<h3>Compile Error:</h3>");
                                                    stringBuilder.AppendLine(ConsoleMain.smethod_0(current2.Description));
                                                    if (ruleStatus == RuleStatus.Good || ruleStatus == RuleStatus.Warning)
                                                    {
                                                        ruleStatus = RuleStatus.Error;
                                                    }
                                                }
                                                else if (current2.ProblemType == RuleStatus.RuntimeError)
                                                {
                                                    num2++;
                                                    stringBuilder.AppendLine("<h3>Runtime Error:</h3>");
                                                    stringBuilder.AppendLine(ConsoleMain.smethod_0(current2.Description));
                                                    if (ruleStatus == RuleStatus.Good || ruleStatus == RuleStatus.Warning)
                                                    {
                                                        ruleStatus = RuleStatus.Error;
                                                    }
                                                }
                                            }
                                            if (ruleStatus == RuleStatus.Good)
                                            {
                                                stringBuilder2.AppendLine(string.Concat(new string[]
                                                {
                                                    "<li><a href=\"#",
                                                    current.Name,
                                                    "\" ><div class=\"good\"  >",
                                                    current.Name,
                                                    "</div></a></li>"
                                                }));
                                            }
                                            else if (ruleStatus == RuleStatus.Warning)
                                            {
                                                stringBuilder2.AppendLine(string.Concat(new string[]
                                                {
                                                    "<li><a href=\"#",
                                                    current.Name,
                                                    "\" ><div class=\"warning\" >",
                                                    current.Name,
                                                    "</div></a></li>"
                                                }));
                                            }
                                            else if (ruleStatus == RuleStatus.Error)
                                            {
                                                stringBuilder2.AppendLine(string.Concat(new string[]
                                                {
                                                    "<li><a href=\"#",
                                                    current.Name,
                                                    "\" ><div class=\"error\" >",
                                                    current.Name,
                                                    "</div></a></li>"
                                                }));
                                            }
                                            string value = ConsoleMain.smethod_2(current.QueryResults.Results);
                                            stringBuilder.AppendLine(value);
                                            stringBuilder.AppendLine("<br />");
                                            stringBuilder.AppendLine("<br />");
                                        }
                                    }
                                    stringBuilder2.AppendLine("</ul>");
                                    using (StreamWriter streamWriter = new StreamWriter(path))
                                    {
                                        streamWriter.WriteLine("<html>");
                                        streamWriter.WriteLine("<head><title>Nitriq Query Results</title>");
                                        streamWriter.Write("\r\n<style type=\"text/css\">\r\nbody\r\n{\r\n\tcursor: default;\r\n\tfont: 0.8em 'Trebuchet MS' , 'Lucida Sans Unicode' , 'Lucida Grande' , 'Lucida' , Arial, Verdana, sans-serif;\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n}\r\n#header {\r\n\tbackground: #d43c11 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA50AAAB5CAMAAACNz7VxAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWtQTFRF6X4D2k8N7IcB64QB10UP21IM6oEC5G4G42sH2EkO6HsD53gE3lsK1T8Q1kIQ3VgL4WUI4GIJ318J5XAG2UsO3FQM7YkA6X0D4GEJ4mcI5G0G3VkL3lwK4WQI10YP5XIF7IYB3FYL5nQF1UAQ53cE6oAC2k4N42oH2EgO1D0R3VcL5G8G314K5nUF21MM4mgH5nMF64UB1kEQ21EM3FUM53YE1T4R2lAN310K4mkH5XEF42wH7IgA6oIC10QP64MC2U0N3loK6HkE4GAJ4WYI2UwO1kMP2EcP6X8C6XwD7YoA2EoO6HoD6HoE4GMJ4WMI2UoO6HwD6n8C10cP2UwN1kMQ4mYI32AJ2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1px 12px;\r\n}\r\n#page {\r\n\tmargin: 1em;\r\n}\r\ntable\r\n{\r\n    border-collapse: collapse;\r\n    border-spacing: 2px;\r\n    display: table;\r\n    margin-bottom: 20px;\r\n    margin-top: 0;\r\n    border-color: rgb(204, 204, 204);\r\n    font-size: 1.0em;\r\n}\r\nthead {\r\n\tbackground: black;\r\n\tcolor: white;\r\n\tpadding: 6px;\r\n}\r\nh1\r\n{\r\n\tfont-family: \"Century Gothic\",\"Apple Gothic\",\"Lucida Grande\",Helvetica,Arial,Verdana,sans-serif; \r\n\tcolor: #481f00;\r\n\ttext-shadow: 0px 1px 0px #eea706;}\r\nh2\r\n{\r\n\tfont-family: \"Century Gothic\",\"Apple Gothic\",\"Lucida Grande\",Helvetica,Arial,Verdana,sans-serif; \r\n\tfont-size: 1.8em;\r\n\tcolor: Black;\r\n\tmargin-bottom: 5px;\r\n\tpadding: 0;\r\n}\r\n\r\nh3\r\n{\r\n\tfont-family: \"Century Gothic\",\"Apple Gothic\",\"Lucida Grande\",Helvetica,Arial,Verdana,sans-serif; \r\n\tfont-size: 1.3em;\r\n\tcolor: Red;\r\n\tmargin-bottom: 10px;\r\n}\r\n\r\ntd\r\n{\r\n\tvertical-align:top;\t\r\n    padding: 2px 6px;\r\n}\r\nthead td {\r\n\tpadding: 4px 6px;\r\n}\r\n\r\ntd.numeric\r\n{\r\n\ttext-align: right;\r\n}\r\n#toc {\r\n\tlist-style: none;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n    width: 450px;\r\n}\r\n/*\r\n#toc a {\r\n\tmargin-left: 20px;\r\n\tpadding-left: 20px;\r\n    font-size: 1.0em;\r\n    vertical-align:middle;\r\n}\r\n\r\n\r\n#toc a {\r\n\tmargin-left: 20px;\r\n\tpadding-left: 20px;\r\n\tbackground: transparent url('good.png') no-repeat scroll left 5px;\r\n}\r\n\r\n#toc a.warning {\r\n\tbackground: transparent url('warning.png') no-repeat scroll left 5px;\r\n\r\n#toc a.problem {\r\n\tbackground: transparent url('error.png') no-repeat scroll left 5px;\r\n*/\r\n\r\ndiv.good\r\n{\r\n\tmargin-left: 20px;\r\n\tpadding-bottom: 4px;\r\n\tpadding-top: 3px;\r\n\tpadding-left: 20px;\r\n\tbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACK0lEQVQ4jaWSXUhTYRjH/+/O3uPOOfs4W2oRRGI0jPYRStaIjMS6SyQoC+kD0rqJwAjqqo+bbpLoQorIhjaShIqRLUtzdaHDDywpmzZ0NIS0rDV1tg87e7uQRMps1R+em+fh91z8+RHGGP4nqr8FhFqi/ucHopNI8qip23RQbplfMsbSGuEGpOVn5P72wVZ2wLmXqXbhIWMMJJ0OhGtEMoRk363DjbaGrjqMJcchJw1wP3jcPP8gq5FfBkZyJyoSvQthfT2RMob0PldVo83lv4nWTx5wMYpZLw0mZqIFKgDQ1JJM80d7YEPY0SHVk+0/4JX3Ja32ndHnOn7b1jTegF7aAS3VIeyJDUenI5Zoy2xEnX1RzC4WS/zVpdWmqBLFpCfiWXFXs1MStT10SNdZc+SyrfnzPQzS1xATOvibQiMklbImnrA4AHCKTK4XlTgKPwjviSwaUZCXT/u8A+UI0apzlWfNL+M9CHBvoEwR9DsDQS5LscbvzMEA5koUyjRP83av2movtPP5uo2ghIeBGjGovMII3mL6ywye1XQH+U1JS/ioElvYkRoAYu54CVemaoOMIrb5G2/m1yHMTWCCG4MyBXRcfRHMqchcP1A8GsdPmbdKcad20D2qdllv2mLcZswQiIDUJPD8UlfQccJqebS28xd4UZEy9qnbyntLExfCp1nuqZzhk18rNUsJtuhSd0j0rjm/uq+OXRH+ZOhvD8fi+2k6iqel8lL5Dvo2ZEkd1D8WAAAAAElFTkSuQmCC) no-repeat scroll left 5px;\r\n}\r\n\r\ndiv.warning\r\n{\r\n\tmargin-left: 20px;\r\n\tpadding-bottom: 4px;\r\n\tpadding-top: 3px;\r\n\tpadding-left: 20px;\r\n\tbackground: url(data:image/png;base64,iVBOR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oWbrGCXPqRsvYMkEVIJIBeONaEz772vwXgCSlnipCpvPtfYXVC//ICSEpI6ktTxjWCMgaQO8QSIRpcDLrT1yVrIqz1UpK+2zButw/Ju+2A2QVXg0BNQn4bpBbB/APdgrAFeCa4H2Q7jiaObRTObmd70NlUw9WchFehCa3m403gKqsnD8zTRUAcwOQtffYlXHW0EI/ZpeWXOnB8N1Uu+zZ9SIrloDaKdU55z2hv+li2ULayEYs1szVYC5cK7u/6d22vlZ38PAJI7+deccN2ZAAAAAElFTkSuQmCC) no-repeat scroll left 5px;\r\n}\r\n\r\ndiv.error\r\n{\r\n\tmargin-left: 20px;\r\n\tpadding-bottom: 4px;\r\n\tpadding-top: 3px;\r\n\tpadding-left: 20px;\r\n\tbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADKklEQVQ4jW2T208cdRxHz292Z3aGhQK7LBcxmkDLpYKNtqEJrrQl8aFqo6kmXtun/gO+a4x4SRsf1BBsTZqo6ENNTDS2WjGa2lIwVlqsEMrFsrUBuwvLpTA7y+zszNenGkXP8/mct48SETZzqvKuttqW5mTplrIG8QO1nsnMplM3Lj5vL45tdtU/Ax9FYy0d3Xvf2Lqn64DR2mxwKw3FIgQ++YWsNzU0fGbkwsWXj7hrE/8JfFpZu+/Rx/efitXUVOM4gAIJQABNga6DofNn6o/sN98OPHfEXv7+70BfZMvWg8nO4TrTStiLi6SBezSFbpWgEIqBMGeY1KytYlXF+X1lZfn0pZGHXirmJjWA+xJVb5VnFhOzV0aZaWoifLyXqXictau/sXZ1jGuRCOpoD9PNTcxdHqVu9XasMVZ5DIBjymqZqKx1fwlbMtjUJrZti4jIcjotlx/YLSNtD0p2bl5ERGzHkUst98uvYVN+Lot5PcpsC+0P6QeNYvHJMc/FWV/F0sIk9u7BLC3FPPAYFS88S+zuegRIHX2bma++IOV5BMVAyyIToWRIf7ogkrwZBCjfZ/H8OTQ7h7lzF6FoCZppks/lmHn1NUbf7OG2H7CEhg/kUBPhHCilYBofF0UCGD9zlujhQ+gVFSBC0baZODvACmCjmCMgD7iElFYQuZ5QijggBJjb22k60YcTCuHk8zgbG+QEGt/vRd+xkxw+BYQSpfAgpeX8YFDXNK8NofXeBna9+w45Q8dxC7h9xyn09pH3CqwpofPkSXbv6GAbQrnSio7Iee0DcSev+/6X7bpFeXaByE/DhEwTq/8T1nvfY72vF+vDjzGipXg/fIebmqRd05kXvj4h7rgSEQ6rSGOXFRnuKBSql0SIdT0MP54jCmiAg8C+brKDQ5QVi1zR9aVBz+/sF3caEUFEeFEZyf6S8ls3jajMgzh6iUisRqSqTlyzTDIgN0KW9BvRzCFldN/Z/etMzyhjW2sk8vojlvXE9upqc0t9PQQB6wsLTKczGwM5+/R4wXvlM3Gn/veNd3hKRVriYT0ZN60GEZ+VQmF2yfOGPhf32mb3L9WplnZ5n/+WAAAAAElFTkSuQmCC) no-repeat scroll left 5px;\r\n}\r\n\r\nimg\r\n{\r\n    border:0 none;\r\n}\r\n\r\nimg.statusIcon\r\n{\r\n    margin-right: 5px;\r\n}\r\n\r\n}\r\n\r\n</style>\r\n\r\n");
                                        streamWriter.WriteLine("</head>");
                                        streamWriter.WriteLine("<body>");
                                        streamWriter.WriteLine("<div id=\"header\"><h1>Nitriq Console Edition Results</h1></div>");
                                        streamWriter.WriteLine("<div id=\"page\">");
                                        streamWriter.WriteLine(stringBuilder2.ToString());
                                        streamWriter.WriteLine(stringBuilder.ToString());
                                        streamWriter.WriteLine("</div>");
                                        streamWriter.WriteLine("</body></html>");
                                    }
                                    if (num2 > 0 || (flag && num > 0))
                                    {
                                        Console.WriteLine("Nitriq Analysis Completed with Analysis Errors");
                                        result = 1;
                                    }
                                    else
                                    {
                                        Console.WriteLine("Nitriq Analysis Completed");
                                        result = 0;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception: " + ex.ToString());
                result = 1;
            }
            return(result);
        }
コード例 #30
0
ファイル: ACountingRule.cs プロジェクト: zhuzhu007/CodingTest
 protected ACountingRule(string ruleId, List <RuleFilter> filters)
 {
     _ruleStatus = RuleStatus.Active;
     _ruleId     = ruleId;
     Filters     = filters;
 }
コード例 #31
0
        public async Task <IActionResult> withdraw([FromBody] dynamic model /*int AccountId, int amount*/)
        {
            if (Convert.ToInt32(model.AccountId) == 0 || Convert.ToInt32(model.amount) == 0)
            {
                _log4net.Info("Either AccountId or amount is invalid");
                return(NotFound(new TransactionStatus()
                {
                    message = "Withdraw Not Allowed"
                }));
            }
            HttpClient client = obj.AccountDetails();

            _log4net.Info("getAccount Api called");

            HttpResponseMessage response = client.GetAsync("api/Account/getAccount/?AccountId=" + model.AccountId).Result;

            var     result = response.Content.ReadAsStringAsync().Result;
            Account acc    = JsonConvert.DeserializeObject <Account>(result);

            // HttpClient client1 = obj.RuleApi();
            // var balance = acc.Balance - model.amount;
            // HttpRequestMessage res = client1.GetAsync("api/Rules/evaluateMinBal/?balance=" + balance + "&?AccountId=" + model.AccountId).Result;
            //HttpRequestMessage res = client.GetAsync("api/Rules/evaluateMinBal", new { Balance = Convert.ToInt32(balance),AccountId = Convert.ToInt32(model.AccountId)}).Result;
            // var result2 = response.Content.ReadAsStringAsync().Result;
            // RuleStatus rs = JsonConvert.DeserializeObject<RuleStatus>(result2);

            RuleStatus rs = new RuleStatus()
            {
                status = "allowed"
            };

            if (rs.status == "allowed")
            {
                _log4net.Info("withdraw Api called");
                HttpResponseMessage response1 = client.PostAsJsonAsync("api/Account/withdraw", new { AccountId = Convert.ToInt32(model.AccountId), amount = Convert.ToInt32(model.amount) }).Result;
                var result1          = response1.Content.ReadAsStringAsync().Result;
                TransactionStatus st = JsonConvert.DeserializeObject <TransactionStatus>(result1);

                cnt = cnt + 256;
                TransactionHistory history = new TransactionHistory()
                {
                    TransactionId       = cnt,
                    AccountId           = Convert.ToInt32(model.AccountId),
                    message             = st.message,
                    source_balance      = st.source_balance,
                    destination_balance = st.destination_balance,
                    DateOfTransaction   = DateTime.Now,
                    CustomerId          = acc.CustomerId
                };

                _provider.AddToTransactionHistory(history);

                _log4net.Info("Valid AccountId and amount");
                return(Ok(st));
            }

            return(NotFound(new TransactionStatus()
            {
                message = "Withdraw Not Allowed"
            }));
        }
コード例 #32
0
 private void DisplayItem(RuleStatus status, ConsoleColor original)
 {
     if (status == RuleStatus.Error || status == RuleStatus.Failed)
         _wrapper.ForegroundColor = ConsoleColor.Red;
     if (status == RuleStatus.Passed)
         _wrapper.ForegroundColor = ConsoleColor.Green;
     if (status == RuleStatus.Pending)
         _wrapper.ForegroundColor = ConsoleColor.Yellow;
     _wrapper.WriteLine(status.DisplayName);
     _wrapper.ForegroundColor = original;
 }
コード例 #33
0
 private bool FailedStatus(RuleStatus status)
 {
     return status == RuleStatus.Error || status == RuleStatus.Failed;
 }
コード例 #34
0
 private int GetSpecTypeCount(IEnumerable<SpecificationStatus> results, RuleStatus type)
 {
     return results.Sum(p=>p.Results.Sum(x => x.Rules.Count(y => y.Status == type)));
 }