本文整理汇总了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());
};
}
示例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);
}
示例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());
}
示例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());
}
示例5: ReadFile
public static extern bool ReadFile(
IntPtr hFile,
IntPtr lpBuffer,
UInt32 nNumberOfBytesToRead,
out UInt32 lpNumberOfBytesRead,
IntPtr lpOverlapped
);
示例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");
}
示例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
);
示例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;
}
示例9: GetContent
public void GetContent(CompilerContext context, ParseTreeNode parseNode)
{
if (parseNode.HasChildNodes())
{
ParallelTasks = Convert.ToUInt32(parseNode.ChildNodes[1].Token.Value);
}
}
示例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;
}
示例11: Decode
public override void Decode()
{
MemoryStream stream = new MemoryStream(Data);
BinaryReader reader = new BinaryReader(stream);
this.FirstRowOffset = reader.ReadUInt32();
reader.ReadUInt16();
}
示例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;
}
示例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));
}
}
示例14: VmAfdRpcEnumCertificates
VmAfdRpcEnumCertificates (
UInt32 hBinding,
UInt32 hStore,
UInt32 dwStartIndex,
UInt32 dwNumCertificates,
VMAFD_CERT_CONTAINER ppCertContainer
);
示例15: VmAfdAddCertificate
VmAfdAddCertificate (
string pszServerName,
UInt32 hStore,
string pszAlias,
string pszCertificate,
string pszPrivateKey,
UInt32 uAutoRefresh);