當前位置: 首頁>>代碼示例>>C#>>正文


C# AllocationType類代碼示例

本文整理匯總了C#中AllocationType的典型用法代碼示例。如果您正苦於以下問題:C# AllocationType類的具體用法?C# AllocationType怎麽用?C# AllocationType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AllocationType類屬於命名空間,在下文中一共展示了AllocationType類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的AllocationType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。