本文整理汇总了C#中Int64类的典型用法代码示例。如果您正苦于以下问题:C# Int64类的具体用法?C# Int64怎么用?C# Int64使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Int64类属于命名空间,在下文中一共展示了Int64类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Document
public Document(
Int16 _TypeId,
Int64 _Serial,
Int32 _SignedUser,
DateTime _Date,
Boolean _Printed,
String _DocumentShortName,
String _DocumentFullName,
String _MedexDataTable,
String _DocumentBody,
String _DocumentHeader,
Boolean _SetDeleted
)
{
TypeId = _TypeId;
Serial = _Serial;
SignedUser = _SignedUser;
Date = _Date;
Printed = _Printed;
DocumentShortName = _DocumentShortName;
DocumentFullName = _DocumentFullName;
MedexDataTable = _MedexDataTable;
DocumentBody = _DocumentBody;
DocumentHeader = _DocumentHeader;
SetDeleted = _SetDeleted;
}
示例2: MessageAttemptInfo
public MessageAttemptInfo(Message message, Int64 sequenceNumber, int retryCount, object state)
{
this.message = message;
this.sequenceNumber = sequenceNumber;
this.retryCount = retryCount;
this.state = state;
}
示例3: CreateStateToIncreaseQuotaForApplication
internal static IsolatedStorageSecurityState CreateStateToIncreaseQuotaForApplication(Int64 newQuota, Int64 usedSize) {
IsolatedStorageSecurityState state = new IsolatedStorageSecurityState();
state.m_Options = IsolatedStorageSecurityOptions.IncreaseQuotaForApplication;
state.m_Quota = newQuota;
state.m_UsedSize = usedSize;
return state;
}
示例4: Write
public override void Write(Int64 val)
{
val = Utilities.SwapBytes(val);
base.Write(val);
if (AutoFlush) Flush();
}
示例5: HexNumberToInt64
private static Boolean HexNumberToInt64(ref NumberBuffer number, ref Int64 value)
{
UInt64 passedValue = 0;
Boolean returnValue = HexNumberToUInt64(ref number, ref passedValue);
value = (Int64)passedValue;
return returnValue;
}
示例6: LittleEndian
/// <summary>
/// Converts a <see cref="Int64"/> to little endian notation.
/// </summary>
/// <param name="input">The <see cref="Int64"/> to convert.</param>
/// <returns>The converted <see cref="Int64"/>.</returns>
public static Int64 LittleEndian(Int64 input)
{
if (BitConverter.IsLittleEndian)
return input;
return Swap(input);
}
示例7: MemoryMappedView
private unsafe MemoryMappedView(SafeMemoryMappedViewHandle viewHandle, Int64 pointerOffset,
Int64 size, MemoryMappedFileAccess access) {
m_viewHandle = viewHandle;
m_pointerOffset = pointerOffset;
m_size = size;
m_access = access;
}
示例8: CreateStateToIncreaseQuotaForGroup
internal static IsolatedStorageSecurityState CreateStateToIncreaseQuotaForGroup(String group, Int64 newQuota, Int64 usedSize) {
IsolatedStorageSecurityState state = new IsolatedStorageSecurityState();
state.m_Options = IsolatedStorageSecurityOptions.IncreaseQuotaForGroup;
state.m_Group = group;
state.m_Quota = newQuota;
state.m_UsedSize = usedSize;
return state;
}
示例9: Int64
public static byte[] Int64(Int64 i, Endianness e = Endianness.Machine)
{
byte[] bytes = BitConverter.GetBytes(i);
if (NeedsFlipping(e)) Array.Reverse(bytes);
return bytes;
}
示例10: UserExist
public static bool UserExist(Int64 id)
{
String where = String.Format("id = {0}", id);
DataRow userData = Db.Instance.dSet.users.FindByid(id);
if (userData != null)
{
return true;
}
return false;
}
示例11: CanMerge
// Returns true if merging the number will not increase the number of ranges past MaxSequenceRanges.
public static bool CanMerge(Int64 sequenceNumber, SequenceRangeCollection ranges)
{
if (ranges.Count < ReliableMessagingConstants.MaxSequenceRanges)
{
return true;
}
ranges = ranges.MergeWith(sequenceNumber);
return ranges.Count <= ReliableMessagingConstants.MaxSequenceRanges;
}
示例12: Write
public static void Write(this BinaryWriter writer, Int64 value, bool invertEndian = false)
{
if (invertEndian)
{
writer.WriteInvertedBytes(BitConverter.GetBytes(value));
}
else
{
writer.Write(value);
}
}
示例13: OnHandshake
public void OnHandshake(IPeerWireClient peerWireClient, byte[] handshake)
{
BDict dict = (BDict)BencodingUtils.Decode(handshake);
if (dict.ContainsKey("metadata_size"))
{
BInt size = (BInt)dict["metadata_size"];
_metadataSize = size;
_pieceCount = (Int64)Math.Ceiling((double)_metadataSize / 16384);
}
RequestMetaData(peerWireClient);
}
示例14: SequenceRange
public SequenceRange(Int64 lower, Int64 upper)
{
if (lower < 0)
{
throw Fx.AssertAndThrow("Argument lower cannot be negative.");
}
if (lower > upper)
{
throw Fx.AssertAndThrow("Argument upper cannot be less than argument lower.");
}
this.lower = lower;
this.upper = upper;
}
示例15: TestList
private static void TestList()
{
var random = new Random(DateTime.UtcNow.Millisecond);
var inputItems = new Int64[itemsCount];
for (var index = 0; index < itemsCount; index++)
{
inputItems[index] = random.Next();
}
var result = CollectionLoadTestHelper.RunAllAsync(inputItems, concurrentWritersCount).Result;
PrintResults(result);
}