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

C# AllocationType类代码示例

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

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



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

示例1: AddAllocation

        /// <summary>
        /// Add allocations to the current transaction
        /// </summary>
        /// <param name="fid">
        /// 3-character FID code identifying your merchant activity.  These are assigned by Internal Control.
        /// </param>
        /// <param name="chart">
        /// 1-character chart code of the account to which you want to allocate the credit transaction.
        /// </param>
        /// <param name="account">
        /// 7-character account number to which you want to allocate the credit transaction.
        /// </param>
        /// <param name="subAccount">Optional</param>
        /// <param name="project">Optional</param>
        /// <param name="giftNotificationId">
        /// Used by gift transactions to direct the generated gift document to a particular person.  
        /// If this value is not passed (or is not valid) then the gift document will be generated 
        /// to the inbox of the person set up as the default on the server. 
        /// This value should be the UCD Login ID of the desired recipient in upper case.
        /// </param>
        /// <param name="allocationValue">
        /// The amount or percent to allocate to this allocation
        /// </param>
        /// <param name="allocationType">
        /// The type of allocation -- either percent or $ amount
        /// </param>
        public void AddAllocation(string fid, string chart, string account, string subAccount, string project, string giftNotificationId, double allocationValue, AllocationType allocationType)
        {
            var allocation = new allocRequestTransactionAllocation
                                 {
                                     fid = fid,
                                     chart = chart,
                                     account = account,
                                     subAccount = subAccount,
                                     project = project,
                                     giftNotificationId = giftNotificationId
                                 };

            switch (allocationType)
            {
                case AllocationType.Amount:
                    allocation.amount = allocationValue;
                    allocation.amountSpecified = true;
                    break;
                case AllocationType.Percent:
                    allocation.percent = allocationValue;
                    allocation.percentSpecified = true;
                    break;
                default:
                    throw new ArgumentOutOfRangeException("allocationType");
            }

            //Now we have an allocation, add it to the allocation collection
            Allocations.Add(allocation);
        }
开发者ID:srkirkland,项目名称:SplitTransactions,代码行数:55,代码来源:TransactionAllocationManager.cs


示例2: AddHolding

        public void AddHolding(AllocationType allocType, string symbol, decimal price, decimal quanity)
        {
            Holding holding = new Holding(this)
                    {
                        AllocType = allocType,
                        Symbol = symbol,
                        Price = price,
                        Quantity = quanity,
                    };

            m_TotalValue += holding.Value;

            Holdings.Add(holding);
        }
开发者ID:KNeal,项目名称:EtradeAlloc,代码行数:14,代码来源:Portfolio.cs


示例3: ReadFrom

        public int ReadFrom(byte[] buffer, int offset)
        {
            PriorDirectEntries = Utilities.ToUInt32LittleEndian(buffer, offset);
            StrategyType = Utilities.ToUInt16LittleEndian(buffer, offset + 4);
            StrategyParameter = Utilities.ToUInt16LittleEndian(buffer, offset + 6);
            MaxEntries = Utilities.ToUInt16LittleEndian(buffer, offset + 8);
            FileType = (FileType)buffer[offset + 11];
            ParentICBLocation = Utilities.ToStruct<LogicalBlockAddress>(buffer, offset + 12);

            ushort flagsField = Utilities.ToUInt16LittleEndian(buffer, offset + 18);
            AllocationType = (AllocationType)(flagsField & 0x3);
            Flags = (InformationControlBlockFlags)(flagsField & 0xFFFC);

            return 20;
        }
开发者ID:AnotherAltr,项目名称:Rc.Core,代码行数:15,代码来源:InformationControlBlock.cs


示例4: AssignAllocationValue

        public void AssignAllocationValue(AllocationType allocationType, int allocationId, string allocationName)
        {
            switch (allocationType)
            {
                case AllocationType.Engagement:
                    this.TimesheetEntrySummaryLineKey.EngagementId = allocationId;
                    break;
                case AllocationType.Project:
                    this.TimesheetEntrySummaryLineKey.ProjectId = allocationId;
                    break;
                case AllocationType.BillingRule:
                    this.TimesheetEntrySummaryLineKey.BillingRuleId = allocationId;
                    break;
                case AllocationType.CostCenter:
                    this.TimesheetEntrySummaryLineKey.CostCenterId = allocationId;
                    break;
                case AllocationType.GeneralLedger:
                    this.TimesheetEntrySummaryLineKey.GeneralLedgerId = allocationId;
                    break;
            }

            var allocationValue = new AllocationValue { AllocationType = allocationType, AllocationId = allocationId, AllocationName = allocationName };
            this.timesheetEntryAllocationSlots[allocationType] = allocationValue;
        }
开发者ID:milanc,项目名称:TSApproverDomain,代码行数:24,代码来源:TimesheetEntrySummaryLine.cs


示例5: AllocateMemory

 /// <summary>
 /// Allocates memory of specified type on the xbox.
 /// </summary>
 /// <param name="type"></param>
 /// <param name="size"></param>
 /// <returns>Allocated address.</returns>
 public uint AllocateMemory(AllocationType type, uint size)
 {
     switch (type)
     {
         case AllocationType.Debug:		return AllocateDebugMemory(size);
         case AllocationType.Physical:	return AllocatePhysicalMemory(size);
         case AllocationType.System:		return AllocateSystemMemory(size);
         case AllocationType.Virtual:	return AllocateVirtualMemory(size);
         default:						throw new Exception("Invalid allocation type.");
     }
 }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:17,代码来源:Xbox.cs


示例6: VirtualAllocEx

 public static extern DWORD_PTR VirtualAllocEx( IntPtr hProcess, DWORD_PTR lpAddress, uint dwSize, AllocationType flAllocationType, MemoryProtection flProtect );
开发者ID:aghili,项目名称:nwohack,代码行数:1,代码来源:WinAPI.cs


示例7: VirtualAllocEx

 private static extern IntPtr VirtualAllocEx(
     IntPtr hProcess,
     IntPtr lpAddress,
     IntPtr dwSize,
     AllocationType flAllocationType,
     uint flProtect);
开发者ID:rubycoder,项目名称:EssentialCSharp,代码行数:6,代码来源:Listing20.20.DesignatingABlockForUnsafeCode.cs


示例8: VirtualAllocEx

 internal static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr address, UIntPtr size, AllocationType allocationType, MemoryProtect protect);
开发者ID:modulexcite,项目名称:nasmjit,代码行数:1,代码来源:VirtualMemory.cs


示例9: VirtualAllocEx

 internal static extern IntPtr VirtualAllocEx(SafeProcessHandle processHandle, IntPtr address, SizeT size, AllocationType flAllocationType,
     MemoryProtection flProtect);
开发者ID:ericschultz,项目名称:coapp,代码行数:2,代码来源:Kernel32.cs


示例10: VirtualAllocEx

 static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, IntPtr dwSize, AllocationType flAllocationType, MemoryProtection flProtect);
开发者ID:azsry,项目名称:T6UnitedConsole,代码行数:1,代码来源:Form1.cs


示例11: FillAllocationSlot

 public void FillAllocationSlot(AllocationType allocationType, AllocationValue allocationValue)
 {
     this.alloctionSlots[allocationType] = allocationValue;
 }
开发者ID:milanc,项目名称:TSApproverDomain,代码行数:4,代码来源:TimesheetEntryAllocationSlots.cs


示例12: VirtualAllocEx

 public static extern int VirtualAllocEx(IntPtr hProcess, Int32 lpAddress,
    Int32 dwSize, AllocationType flAllocationType, MemoryProtection flProtect);
开发者ID:Lamael,项目名称:tools,代码行数:2,代码来源:WinApi.cs


示例13: VirtualAlloc

 public static extern IntPtr VirtualAlloc(IntPtr lpAddress, uint dwSize, AllocationType flAllocationType, ProtectType flProtect);
开发者ID:yuta1011tokyo,项目名称:Liplis-Windows,代码行数:1,代码来源:MemoryCleenClass.cs


示例14: AllocationEntry

 public AllocationEntry(uint address, uint size, AllocationType type)
 {
     Address = address;
     Size = size;
     Type = type;
 }
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:6,代码来源:Xbox.cs


示例15: VirtualAllocEx

 internal static extern IntPtr VirtualAllocEx(SafeProcessHandle hProcess, uint dwAddress, int nSize, AllocationType dwAllocationType, MemoryProtection dwProtect);
开发者ID:hfenigma,项目名称:d3adventure,代码行数:1,代码来源:Imports.cs


示例16: VirtualFreeEx

 public static extern bool VirtualFreeEx(
     IntPtr hProcess,
     IntPtr lpAddress,
     uint dwSize,
     AllocationType dwFreeType);
开发者ID:jzebedee,项目名称:cacheout,代码行数:5,代码来源:Imports.cs


示例17: VirtualFree

 public static extern bool VirtualFree(UIntPtr lpAddress, UIntPtr dwSize, AllocationType dwFreeType);
开发者ID:Scooletz,项目名称:RampUp,代码行数:1,代码来源:Native.cs


示例18: VirtualAlloc

     public static extern IntPtr VirtualAlloc(IntPtr lpAddress, UIntPtr dwSize,
 AllocationType flAllocationType, MemoryProtection flProtect);
开发者ID:adamsp,项目名称:beastmon,代码行数:2,代码来源:Opcode.cs


示例19: AllocationInfo

 public AllocationInfo(AllocationType type, int size)
 {
     this.type = type;
     this.size = size;
 }
开发者ID:FarazShaikh,项目名称:likewise-open,代码行数:5,代码来源:DebugMarshal.cs


示例20: VirtualFreeEx

 internal static extern bool VirtualFreeEx(SafeProcessHandle processHandle, IntPtr address, SizeT size, AllocationType flAllocationType);
开发者ID:ericschultz,项目名称:coapp,代码行数:1,代码来源:Kernel32.cs



注:本文中的AllocationType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Altaxo类代码示例发布时间:2022-05-24
下一篇:
C# AllJoynMessageInfo类代码示例发布时间: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