internal static long Add(long a, long b) { return(a + b); }
public SimulationObject GetObject(long A_0) => _internal.a((long)A_0);
public SeiyuuBuilder WithMalId(long malId) { _malId = malId; return(this); }
PurchaseInfo(PurchaseTypes purchaseType, int itemId, string description, short purchaseId, long price) { PurchaseType = purchaseType; PurchaseItemId = itemId; PurchaseGroupId = purchaseId; Description = description; Price = price; }
public static Stream PUT(Uri uri, long ContentLength, bool timeout, bool do_log) { if (do_log) log.DebugFormat("HTTP PUTTING file to {0}", uri); return HTTP.PUT(uri, XenAdminConfigManager.Provider.GetProxyFromSettings(null), ContentLength, XenAdminConfigManager.Provider.GetProxyTimeout(timeout)); }
/** <inheritdoc /> */ public IAtomicSequence GetAtomicSequence(string name, long initialValue, bool create) { return _ignite.GetAtomicSequence(name, initialValue, create); }
public static PurchaseInfo NewFeature(short groupId, int itemId, string description, long price) { return(new PurchaseInfo(PurchaseTypes.Feature, itemId, description, groupId, price)); }
public static List <T> SkipTake(long skip, long take, string sql, params object[] args) { return(repo.SkipTake <T>(skip, take, sql, args)); }
public static List <T> SkipTake(long skip, long take, Sql sql) { return(repo.SkipTake <T>(skip, take, sql)); }
public static List <T> Fetch(long page, long itemsPerPage, string sql, params object[] args) { return(repo.Fetch <T>(page, itemsPerPage, sql, args)); }
public static List <T> Fetch(long page, long itemsPerPage, Sql sql) { return(repo.Fetch <T>(page, itemsPerPage, sql)); }
internal static long Divide(long a, long b) { return(a / b); }
internal static long Multiply(long a, long b) { return(a * b); }
internal static long Subtract(long a, long b) { return(a - b); }
/** <inheritdoc /> */ public ICollection<IClusterNode> GetTopology(long ver) { return _ignite.GetCluster().GetTopology(ver); }
public static Page <T> Page(long page, long itemsPerPage, string sql, params object[] args) { return(repo.Page <T>(page, itemsPerPage, sql, args)); }
/** <inheritdoc /> */ public IAtomicLong GetAtomicLong(string name, long initialValue, bool create) { return _ignite.GetAtomicLong(name, initialValue, create); }
public static Page <T> Page(long page, long itemsPerPage, Sql sql) { return(repo.Page <T>(page, itemsPerPage, sql)); }
public BinaryState(long sessionId, bool isTrue) { this = default(BinaryState); SessionId = sessionId; IsTrue = isTrue; }
private async Task AddUserLogAsync(long userId, LogType logType) { var addUserLogModel = new AddUserLogModel(userId, logType); await UserLogApplicationService.AddAsync(addUserLogModel); }
public static PurchaseInfo NewSubscription(short groupId, int itemId, string description, long price, long duration) { return(new PurchaseInfo(itemId, description, groupId, price, duration)); }
public async Task<UserModel> SelectAsync(long userId) { return await UserRepository.SelectAsync<UserModel>(userId); }
PurchaseInfo(int itemId, string description, short purchaseId, long price, long duration) : this(PurchaseTypes.Subscription, itemId, description, purchaseId, price) { Duration = duration; }
public CurrentCount(string key, long count) { this.Key = key; this.Count = count; }
static void Main(string[] args) { string number = Console.ReadLine(); string result = ""; bool canFit = false; try { sbyte checkNum = sbyte.Parse(number); result += "* sbyte\r\n"; canFit = true; } catch { } try { byte checkNum = byte.Parse(number); result += "* byte\r\n"; canFit = true; } catch { } try { short checkNum = short.Parse(number); result += "* short\r\n"; canFit = true; } catch { } try { ushort checkNum = ushort.Parse(number); result += "* ushort\r\n"; canFit = true; } catch { } try { int checkNum = int.Parse(number); result += "* int\r\n"; canFit = true; } catch { } try { uint checkNum = uint.Parse(number); result += "* uint\r\n"; canFit = true; } catch { } try { long checkNum = long.Parse(number); result += "* long\r\n"; canFit = true; } catch { } if (canFit) { Console.WriteLine($"{number} can fit in:\r\n{result}"); } else { Console.WriteLine($"{number} can't fit in any type"); } }
public Counter(string key, long initialValue) { this.key = key; this.count = initialValue; }
private void RunWriteQueueAction() { //Dequeue all items until threshold is passed long totalLength = 0; RecyclableMemoryStream stream = null; var streamIdsAvailable = true; while (totalLength < CoalescingThreshold) { OperationState state; if (!_writeQueue.TryDequeue(out state)) { //No more items in the write queue break; } short streamId; if (!_freeOperations.TryPop(out streamId)) { streamIdsAvailable = false; //Queue it up for later. _writeQueue.Enqueue(state); //When receiving the next complete message, we can process it. _logger.Info("Enqueued, no streamIds available. If this message is recurrent consider configuring more connections per host or lower the pressure"); break; } _logger.Verbose("Sending #{0} for {1} to {2}", streamId, state.Request.GetType().Name, Address); _pendingOperations.AddOrUpdate(streamId, state, (k, oldValue) => state); Interlocked.Increment(ref _inFlight); int frameLength; try { //lazy initialize the stream stream = stream ?? (RecyclableMemoryStream) Configuration.BufferPool.GetStream(GetType().Name + "/SendStream"); frameLength = state.Request.WriteFrame(streamId, stream); if (Configuration.SocketOptions.ReadTimeoutMillis > 0 && Configuration.Timer != null) { state.Timeout = Configuration.Timer.NewTimeout(OnTimeout, streamId, Configuration.SocketOptions.ReadTimeoutMillis); } } catch (Exception ex) { //There was an error while serializing or begin sending _logger.Error(ex); //The request was not written, clear it from pending operations RemoveFromPending(streamId); //Callback with the Exception state.InvokeCallback(ex); break; } //We will not use the request any more, stop reference it. state.Request = null; totalLength += frameLength; } if (totalLength == 0L) { //nothing to write Interlocked.Exchange(ref _isWriteQueueRuning, 0); if (streamIdsAvailable && !_writeQueue.IsEmpty) { //The write queue is not empty //An item was added to the queue but we were running: try to launch a new queue RunWriteQueue(); } if (stream != null) { //The stream instance could be created if there was an exception while generating the frame stream.Dispose(); } return; } //Write and close the stream when flushed // ReSharper disable once PossibleNullReferenceException : if totalLength > 0 the stream is initialized _tcpSocket.Write(stream, () => stream.Dispose()); }
public Entry(string key, long value) { this.Key = key; this.Value = value; }
/// <summary> /// Writes a 64-bit signed integer to the stream, using the bit converter /// for this writer. 8 bytes are written. /// </summary> /// <param name="value">The value to write</param> internal void Write(long value) { BigEndianBitConverter.CopyBytes(value, buffer, 0); WriteInternal(buffer, 8); }
internal static long Modulo(long a, long b) { return(a % b); }