• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IAccount类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IAccount的典型用法代码示例。如果您正苦于以下问题:C# IAccount类的具体用法?C# IAccount怎么用?C# IAccount使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IAccount类属于命名空间,在下文中一共展示了IAccount类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Transfer

 public Transfer(float amount, IAccount from, IAccount to)
 {
     From = from;
     To = to;
     Amount = amount;
     History = new List<IOperationHistory>();
 }
开发者ID:Tolga,项目名称:Bank,代码行数:7,代码来源:Transfer.cs


示例2: Transaction

 public Transaction(IAccount account, IPayment payout, string currency)
 {
     Account = account;
     Payment = payout;
     Currency = currency;
     CreatedAt = DateTime.Now;
 }
开发者ID:carloslozano,项目名称:CoiniumServ,代码行数:7,代码来源:Transaction.cs


示例3: FlistService

        public FlistService(IAccount model, IEventAggregator eventagg, IBrowseThings browser,
            IGetTickets ticketService, IFriendRequestService requestService)
        {
            this.browser = browser;
            this.ticketService = ticketService;
            this.requestService = requestService;

            try
            {
                this.model = model.ThrowIfNull("model");
                events = eventagg.ThrowIfNull("eventagg");

                events.GetEvent<LoginEvent>().Subscribe(GetTicket, ThreadOption.BackgroundThread);
                events.GetEvent<UserCommandEvent>().Subscribe(HandleCommand, ThreadOption.BackgroundThread);
                events.GetEvent<CharacterSelectedLoginEvent>().Subscribe(args => selectedCharacter = args);

                // fix problem with SSL not being trusted on some machines
                ServicePointManager.ServerCertificateValidationCallback =
                    (sender, certificate, chain, sslPolicyErrors) => true;
            }
            catch (Exception ex)
            {
                Exceptions.HandleException(ex);
            }
        }
开发者ID:WreckedAvent,项目名称:slimCat,代码行数:25,代码来源:FlistService.cs


示例4: AddAccount

 /// <summary>
 /// Attempts to try and add an account to the database.
 /// </summary>
 /// <param name="newAccount">Account to add</param>
 public void AddAccount(IAccount newAccount)
 {
     if (accounts.Select(x => x).Any(x => x.Username == newAccount.Username))
         throw new Exception();
     newAccount.TableID = tableID++;
     accounts.Add(newAccount);
 }
开发者ID:Rabka,项目名称:BDSA2014,代码行数:11,代码来源:OnlineContextStub.cs


示例5: GetDefaultAccount

		public IAccount GetDefaultAccount()
		{
			if (defaultAccount == null || accounts1.ContainsKey(defaultAccount.Id) == false)
			{
				defaultAccount = accounts1.First((a) => true);

				if (defaultAccount != null)
				{
					accounts1.ForEach(
						(other) =>
						{
							if (other.Id < defaultAccount.Id)
								defaultAccount = other;
						});
				}
				else
				{
					int id = AddAccount(new Account()
					{
						DomainName = @"officesip.local",
					});

					defaultAccount = accounts1.GetValue(id);
				}
			}

			return defaultAccount;
		}
开发者ID:hungdluit,项目名称:sipserver,代码行数:28,代码来源:Accountx.cs


示例6: TransferFunds

 public void TransferFunds(IAccount fromAccnt, IAccount toAccnt, double amount)
 {
     //customer can use the transfer service which implement the ITransferFunds Interface
     //Future:this is good place to check for Authorization of customer for $ transfer before method call
     CustomerTransferFunds initiateTransfer = new CustomerTransferFunds();
     initiateTransfer.Account_To_Account_Transfer(this, fromAccnt, toAccnt, amount);
 }
开发者ID:hacknop,项目名称:abc-bank-csharp,代码行数:7,代码来源:Customer.cs


示例7: GetOper

        // ָ��Ϊǰһ�����ֵ���룬׬x%���
        public override ICollection<StockOper> GetOper(DateTime day, IAccount account)
        {
            IStockData prevStockProp = stockHistory.GetPrevDayStock(day);
            if (prevStockProp == null)
            {
                Debug.WriteLine("StrategyPercent -- GetPrevDayStock ERROR: Cur Day: " + day.ToLongDateString());
                return null;
            }

            ICollection<StockOper> opers = new List<StockOper>();
            int stockCount = Transaction.GetCanBuyStockCount(account.BankRoll,
                    prevStockProp.MinPrice);
            if (stockCount > 0)
            {
                StockOper oper = new StockOper(prevStockProp.MinPrice, stockCount, OperType.Buy);
                opers.Add(oper);
            }

            if (stockHolder.HasStock())
            {
                double unitCost = stockHolder.UnitPrice;
                if (unitCost > 0)
                {
                    StockOper oper2 = new StockOper(unitCost * (1 + winPercent), stockHolder.StockCount(), OperType.Sell);
                    opers.Add(oper2);
                }
            }

            return opers;
        }
开发者ID:soross,项目名称:stockanalyzer,代码行数:31,代码来源:StrategyPercent.cs


示例8: Account

 public Account(IAccount other)
 {
     Id = other.Id;
     Email = other.Email;
     Password = other.Password;
     DomainName = other.DomainName;
 }
开发者ID:hungdluit,项目名称:sipserver,代码行数:7,代码来源:Account.cs


示例9: EditNotes

 private void EditNotes(IAccount account)
 {
     ("Note: " + account.Notes).Message();
     account.Notes = "Input new note: "
         .ReadLine();
     "Note saved.".Message();
 }
开发者ID:Cyarix,项目名称:PassFruit,代码行数:7,代码来源:AccountDetailSection.cs


示例10: GetAccountFundSalesStep

        public static void GetAccountFundSalesStep( IAccount account, out System.Collections.Generic.IList<Sage.Entity.Interfaces.IAccountFundSales> result)
        {
            //Get a list of all fund sales for this contact
            Sage.Platform.RepositoryHelper<Sage.Entity.Interfaces.IAccountFundSales> f = Sage.Platform.EntityFactory.GetRepositoryHelper<Sage.Entity.Interfaces.IAccountFundSales>();
            Sage.Platform.Repository.ICriteria crit = f.CreateCriteria();

            crit.Add(f.EF.Eq("AccountId", account.Id.ToString()));

            result = crit.List<Sage.Entity.Interfaces.IAccountFundSales>();

            //Get distinct values

            //Calculate the total values
            double totalSales = (Double)(from h in result
                                    select h.TotalSales).Distinct().Sum();

            double totalYTDGrossSales = (Double)(from h in result
                                                 select h.TotalYTDGrossSales).Distinct().Sum();

            double totalYTDNetSales = (Double)(from h in result
                                            select h.TotalYTDNetSales).Distinct().Sum();

            //Add the totals to the the result set
            Sage.Entity.Interfaces.IAccountFundSales totalItem = Sage.Platform.EntityFactory.Create<Sage.Entity.Interfaces.IAccountFundSales>();
            totalItem.RepName = "All";
            totalItem.Sales = totalSales;
            totalItem.YTDGrossSales = totalYTDGrossSales;
            totalItem.YTDNetSales = totalYTDNetSales;

            result.Add (totalItem);
        }
开发者ID:ssommerfeldt,项目名称:TAC_AH,代码行数:31,代码来源:AccountExtension.cs


示例11: EditAccount

        public void EditAccount(IAccount account)
        {
            "Do you want to edit (T)ags, (F)ields, (N)otes or (D)elete the account?"
                .Option("t", () => EditTags(account))
                .Option("f", () => EditFields(account))
                .Option("n", () => EditNotes(account))
                .Option("d", () => _parentSection.DeleteAccount(account))
                .Choose();

            if (!account.IsDirty) {
                return;
            }

            var saved =
            "The account has been edited, press (S) to save it: "
                .Option("s", () => {
                    // ToDo: Save account
                    "Account saved.".Message();
                })
                .Confirm();

            if (saved) {
                return;
            }

            "Press (R) to revert the changes: "
                .Option("r", () => {
                    //ToDo: Revert account
                    "Account reverted.".Message();
                })
                .Choose();
        }
开发者ID:Cyarix,项目名称:PassFruit,代码行数:32,代码来源:AccountDetailSection.cs


示例12: ArgumentNullException

        bool IGroupSync.RemoveAccount(IAccount account)
        {
            if (account == null)
            {
                throw new ArgumentNullException(nameof(account));
            }

            IGroupMembership foundMembership = null;
            foreach (var item in this.AsInterface.GetAccountMemberships().Synchronously())
            {
                if ((item as IInternalGroupMembership).AccountHref.Equals(account.Href, StringComparison.InvariantCultureIgnoreCase))
                {
                    foundMembership = item;
                }

                if (foundMembership != null)
                {
                    break;
                }
            }

            if (foundMembership == null)
            {
                throw new InvalidOperationException("The specified account does not belong to this group.");
            }

            return foundMembership.Delete();
        }
开发者ID:ssankar1234,项目名称:stormpath-sdk-dotnet,代码行数:28,代码来源:DefaultGroup.MembershipSync.cs


示例13: ArgumentNullException

        async Task<bool> IGroup.RemoveAccountAsync(IAccount account, CancellationToken cancellationToken)
        {
            if (account == null)
            {
                throw new ArgumentNullException(nameof(account));
            }

            IGroupMembership foundMembership = null;
            await this.AsInterface.GetAccountMemberships().ForEachAsync(
                item =>
                {
                    if ((item as IInternalGroupMembership).AccountHref.Equals(account.Href, StringComparison.InvariantCultureIgnoreCase))
                    {
                        foundMembership = item;
                    }

                    return foundMembership != null;
                }, cancellationToken).ConfigureAwait(false);

            if (foundMembership == null)
            {
                throw new InvalidOperationException("The specified account does not belong to this group.");
            }

            return await foundMembership.DeleteAsync(cancellationToken).ConfigureAwait(false);
        }
开发者ID:jwynia,项目名称:stormpath-sdk-dotnet,代码行数:26,代码来源:DefaultGroup.Membership.cs


示例14: Throw

        public static IObservable<RecoveryOptionResult> Throw(IAccount account)
        {
            var errorMessage = string.Format(CultureInfo.InvariantCulture, 
                "You are using {0} out of {1} private repositories.", account.OwnedPrivateRepos, account.PrivateReposInPlan);

            return Throw(new PrivateRepositoryQuotaExceededUserError(account, errorMessage));
        }
开发者ID:chris134pravin,项目名称:VisualStudio,代码行数:7,代码来源:PrivateRepositoryQuotaExceededUserError.cs


示例15: PrivateRepositoryQuotaExceededUserError

 public PrivateRepositoryQuotaExceededUserError(IAccount account, string errorMessage, string errorCauseOrResolution = null)
     : base(errorMessage, errorCauseOrResolution)
 {
     UserErrorIcon = StockUserErrorIcon.Error;
     UsedPrivateSlots = account.OwnedPrivateRepos;
     AvaliblePrivateSlots = account.PrivateReposInPlan;
 }
开发者ID:chris134pravin,项目名称:VisualStudio,代码行数:7,代码来源:PrivateRepositoryQuotaExceededUserError.cs


示例16: MyConvertLeadToAccount

        // Example of target method signature
        public static void MyConvertLeadToAccount(ILead lead, IAccount account)
        {
            //===============================================================
            // This code doesn't work.... added it directly to LeadsearchandConvert
            //==========================================================================

            //foreach (ILeadWebsite tmpWebsite in lead.LeadWebsites)
            //{
            //    // Create Account Additional Website Record
            //    Sage.Entity.Interfaces.IAccountWebsite Acctwebsite = Sage.Platform.EntityFactory.Create<Sage.Entity.Interfaces.IAccountWebsite >();
            //    Acctwebsite.Account = account;
            //    Acctwebsite.Notes  = tmpWebsite.Notes ;
            //    Acctwebsite.WebAddress  = tmpWebsite.WebAddress;

            //    try
            //    {
            //        Acctwebsite.Save();
            //    }
            //    catch (Exception)
            //    {

            //        //Exception But Continue
            //    }
            //}
        }
开发者ID:ssommerfeldt,项目名称:TAC_CFXINTPRD,代码行数:26,代码来源:Lead.cs


示例17: GetOper

        // �� 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IAccountRepository类代码示例发布时间:2022-05-24
下一篇:
C# IAcceptanceCriteria类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap