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


C# System.UInt32類代碼示例

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


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

示例1: StratumMiner

        /// <summary>
        /// Creates a new miner instance.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="extraNonce"></param>
        /// <param name="connection"></param>
        /// <param name="pool"></param>
        /// <param name="minerManager"></param>
        /// <param name="storageLayer"></param>
        public StratumMiner(int id, UInt32 extraNonce, IConnection connection, IPool pool, IMinerManager minerManager, IStorageLayer storageLayer)
        {
            Id = id; // the id of the miner.
            ExtraNonce = extraNonce;
            Connection = connection; // the underlying connection.
            Pool = pool;
            _minerManager = minerManager;
            _storageLayer = storageLayer;

            Subscribed = false; // miner has to subscribe.
            Authenticated = false; // miner has to authenticate.

            _logger = Log.ForContext<StratumMiner>().ForContext("Component", pool.Config.Coin.Name);
            _packetLogger = LogManager.PacketLogger.ForContext<StratumMiner>().ForContext("Component", pool.Config.Coin.Name);

            _rpcResultHandler = callback =>
            {
                var asyncData = ((JsonRpcStateAsync)callback); // get the async data.
                var result = asyncData.Result + "\n"; // read the result.
                var response = Encoding.UTF8.GetBytes(result); // set the response.

                Connection.Send(response); // send the response.

                _packetLogger.Verbose("tx: {0}", result.PrettifyJson());
            };
        }
開發者ID:carloslozano,項目名稱:CoiniumServ,代碼行數:35,代碼來源:StratumMiner.cs

示例2: BmpReader

 public BmpReader(string fileName)
 {
     byte[] buffer = System.IO.File.ReadAllBytes(fileName);
     HeaderId = System.Text.Encoding.UTF8.GetString(buffer, 0, 2);
     HeaderFileSize = BitConverter.ToUInt32(buffer, 2);
     OffsetToPixelArray = BitConverter.ToUInt32(buffer, 0xa);
 }
開發者ID:ItsJustSean,項目名稱:subtitleedit,代碼行數:7,代碼來源:BmpReader.cs

示例3: AddNode

        public static INode AddNode(this IGraph myIGraph, UInt32 myUInt32Id)
        {
            if (myIGraph == null)
                throw new ArgumentNullException("myIGraph must not be null!");

            return myIGraph.AddNode(myUInt32Id.ToString());
        }
開發者ID:subbuballa,項目名稱:Walkyr,代碼行數:7,代碼來源:IGraphExtensions.cs

示例4: bin2CArray

        public static Byte[] bin2CArray(Byte[] inputData, UInt32 memberSizeInBytes)
        {
            StringBuilder cArraySB;
              UInt32 sizeSB = (((UInt32)inputData.Length)/memberSizeInBytes +1) * (memberSizeInBytes*2 + 4) + 30;

              cArraySB = new StringBuilder((Int32)sizeSB);

              switch(memberSizeInBytes)
              {
            case 1:
              bin2charArray(inputData,cArraySB);
              break;
            case 2:
              break;
            case 4:
              bin2uintArray(inputData,cArraySB);
              break;
            case 8:
              break;
            default:
              break;
              }

              return (new ASCIIEncoding()).GetBytes(cArraySB.ToString());
        }
開發者ID:sv99,項目名稱:DVSDK,代碼行數:25,代碼來源:HexConv.cs

示例5: ReadFile

 public static extern bool ReadFile(
     IntPtr hFile,
     IntPtr lpBuffer,
     UInt32 nNumberOfBytesToRead,
     out UInt32 lpNumberOfBytesRead,
     IntPtr lpOverlapped
     );
開發者ID:abladon,項目名稱:canvas,代碼行數:7,代碼來源:Functions.cs

示例6: WithRefsWithReturn

 public object WithRefsWithReturn(
     ref string param1,
     ref int param2,
     ref short param3,
     ref long param4,
     ref uint param5,
     ref ushort param6,
     ref ulong param7,
     ref bool param8,
     ref double param9,
     ref decimal param10,
     ref int? param11,
     ref object param12,
     ref char param13,
     ref DateTime param14,
     ref Single param15,
     ref IntPtr param16,
     ref UInt16 param17,
     ref UInt32 param18,
     ref UInt64 param19,
     ref UIntPtr param20
     )
 {
     throw new Exception("Foo");
 }
開發者ID:vlaci,項目名稱:Anotar,代碼行數:25,代碼來源:OnException.cs

示例7: SetupDiEnumDeviceInterfaces

 private static extern Boolean SetupDiEnumDeviceInterfaces(
     IntPtr hDevInfo,
     [MarshalAs(UnmanagedType.AsAny)] Object devInfo,
     ref Guid interfaceClassGuid,
     UInt32 memberIndex,
     ref SP_DEVICE_INTERFACE_DATA deviceInterfaceData
     );
開發者ID:pengxiangqi1991,項目名稱:Camera-Control,代碼行數:7,代碼來源:SetupApi.cs

示例8: FamilyLineInfo

 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="country">地域</param>
 /// <param name="family_line_num">係統番號</param>
 /// <param name="parent_family_line_num">大元の親係統番號</param>
 /// <param name="data">係統データ</param>
 public FamilyLineInfo( Horse.Area country, UInt32 family_line_num, UInt32 parent_family_line_num, ref HFamilyLineData data )
 {
     this.Coutry = country;
     this.FamilyLineNum = family_line_num;
     this.ParentFamilyLuneNum = parent_family_line_num;
     this.Data = data;
 }
開發者ID:hinovana,項目名稱:libwp7n2012,代碼行數:14,代碼來源:FamilyLineInfo.cs

示例9: GetContent

 public void GetContent(CompilerContext context, ParseTreeNode parseNode)
 {
     if (parseNode.HasChildNodes())
     {
         ParallelTasks = Convert.ToUInt32(parseNode.ChildNodes[1].Token.Value);
     }
 }
開發者ID:TheByte,項目名稱:sones,代碼行數:7,代碼來源:ParallelTasksNode.cs

示例10: IsSignatureVerified

        public static bool IsSignatureVerified(AKEKeys ake_keys, DHKeyPair key_pair, byte[] their_public_key_mpi_byte_array, byte[] encrypted_signature_byte_array,
            byte[] hashed_encrypted_signature_byte_array, bool is_top_half_keys, ref UInt32 public_key_id, ref byte[] dsa_public_key_byte_array_encoded)
        {
            if (encrypted_signature_byte_array == null || encrypted_signature_byte_array.Length < 1)
                throw new ArgumentException("IsSignatureVerified: Encrypted signature byte array cannot be null/empty");

            if (hashed_encrypted_signature_byte_array == null || hashed_encrypted_signature_byte_array.Length < 1)
             throw new ArgumentException("IsSignatureVerified: The hashed encrypted byte array cannot be null/empty");

            if (ake_keys == null)
             throw new ArgumentException("IsSignatureVerified: The AKE keys cannot be null");

            bool _is_hash_verified = false;

            if (is_top_half_keys == true)
                _is_hash_verified = IsHashSignatureVerified(ake_keys.GetMACKey2(), encrypted_signature_byte_array, hashed_encrypted_signature_byte_array);
            else
                _is_hash_verified = IsHashSignatureVerified(ake_keys.GetMACKey4(), encrypted_signature_byte_array, hashed_encrypted_signature_byte_array);

            if (_is_hash_verified == false)
             return false;

             if (IsEncryptedSignatureVerified(ake_keys, key_pair, their_public_key_mpi_byte_array,
                 encrypted_signature_byte_array, 0, is_top_half_keys, ref public_key_id, ref dsa_public_key_byte_array_encoded) == false)
              return false;

               return true;
        }
開發者ID:zamud,項目名稱:OTRLib,代碼行數:28,代碼來源:SignatureManager.cs

示例11: Decode

 public override void Decode()
 {
     MemoryStream stream = new MemoryStream(Data);
     BinaryReader reader = new BinaryReader(stream);
     this.FirstRowOffset = reader.ReadUInt32();
     reader.ReadUInt16();
 }
開發者ID:YHTechnology,項目名稱:DocumentManager,代碼行數:7,代碼來源:DBCELL.cs

示例12: CalculateHash

 private static UInt32 CalculateHash(UInt32[] table, UInt32 seed, IList<byte> buffer, int start, int size)
 {
     var crc = seed;
     for (var i = start; i < size - start; i++)
         crc = (crc >> 8) ^ table[buffer[i] ^ crc & 0xff];
     return crc;
 }
開發者ID:vitalii-rurenko,項目名稱:FileComparator,代碼行數:7,代碼來源:CRC32.cs

示例13: Item

        internal Item(UInt32 Id, int Sprite, string PublicName, string Name, string Type, int Width, int Length, double Height, bool Stackable, bool Walkable, bool IsSeat, bool AllowRecycle, bool AllowTrade, bool AllowMarketplaceSell, bool AllowGift, bool AllowInventoryStack, InteractionType InteractionType, int Modes, string VendingIds)
        {
            this.Id = Id;
            this.SpriteId = Sprite;
            this.PublicName = PublicName;
            this.Name = Name;
            this.Type = char.Parse(Type);
            this.Width = Width;
            this.Length = Length;
            this.Height = Height;
            this.Stackable = Stackable;
            this.Walkable = Walkable;
            this.IsSeat = IsSeat;
            this.AllowRecycle = AllowRecycle;
            this.AllowTrade = AllowTrade;
            this.AllowMarketplaceSell = AllowMarketplaceSell;
            this.AllowGift = AllowGift;
            this.AllowInventoryStack = AllowInventoryStack;
            this.InteractionType = InteractionType;
            this.Modes = Modes;
            this.VendingIds = new List<int>();

            foreach (string VendingId in VendingIds.Split(','))
            {
                this.VendingIds.Add(int.Parse(VendingId));
            }
        }
開發者ID:habb0,項目名稱:Bfly,代碼行數:27,代碼來源:Item.cs

示例14: VmAfdRpcEnumCertificates

 VmAfdRpcEnumCertificates (
     UInt32 hBinding,
     UInt32 hStore,
     UInt32 dwStartIndex,
     UInt32 dwNumCertificates,
     VMAFD_CERT_CONTAINER ppCertContainer
 );
開發者ID:saberlilydian,項目名稱:lightwave,代碼行數:7,代碼來源:VMCertStoreAdaptor.cs

示例15: VmAfdAddCertificate

 VmAfdAddCertificate (
     string pszServerName,
     UInt32 hStore,
     string pszAlias,
     string pszCertificate,
     string pszPrivateKey,
     UInt32 uAutoRefresh);
開發者ID:saberlilydian,項目名稱:lightwave,代碼行數:7,代碼來源:VMCertStoreAdaptor.cs


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