public MaterialGap( LocalKey key = null, float size = 16.0f) : base(key: key) { D.assert(key != null); this.size = size; }
public MaterialSlice( LocalKey key = null, Widget child = null) : base(key: key) { D.assert(key != null); D.assert(child != null); this.child = child; }
public _TableElementRow( LocalKey key = null, List <Element> children = null ) { this.key = key; this.children = children; }
public TableRow( LocalKey key = null, Decoration decoration = null, List <Widget> children = null ) { this.key = key; this.decoration = decoration; this.children = children; }
public DataRow( LocalKey key = null, bool selected = false, ValueChanged <bool> onSelectChanged = null, List <DataCell> cells = null ) { D.assert(cells != null); this.key = key; this.selected = selected; this.onSelectChanged = onSelectChanged; this.cells = cells; }
public Temporary AcquireTemporary(Type type, bool isRef = false) { Contracts.CheckValue(type, nameof(type)); Contracts.Check(Il != null, "Cannot access IL for a method that has already been created"); if (_tempDisposer == null) { _tempDisposer = ReleaseLocal; } LocalKey key = new LocalKey(type, isRef); List <LocalBuilder> locals; if (_locals != null && _locals.TryGetValue(key, out locals) && locals.Count > 0) { var temp = locals[locals.Count - 1]; locals.RemoveAt(locals.Count - 1); return(new Temporary(_tempDisposer, temp, key.IsRef)); } return(new Temporary(_tempDisposer, Il.DeclareLocal(key.Type), key.IsRef)); }
/// <summary> /// Called by the Temporary struct's Dispose method, through the _tempDisposer delegate. /// </summary> private void ReleaseLocal(LocalBuilder localBuilder, bool isRef) { Contracts.AssertValue(localBuilder); LocalKey key = new LocalKey(localBuilder.LocalType, isRef); List <LocalBuilder> locals; if (_locals == null) { _locals = new Dictionary <LocalKey, List <LocalBuilder> >(); } else if (_locals.TryGetValue(key, out locals)) { Contracts.Assert(!locals.Contains(localBuilder)); locals.Add(localBuilder); return; } locals = new List <LocalBuilder>(4); _locals.Add(key, locals); locals.Add(localBuilder); }
public _MergeableMaterialSliceKey(LocalKey value) : base() { this.value = value; }
public MergeableMaterialItem( LocalKey key) { D.assert(key != null); this.key = key; }
public CallbackAction(LocalKey intentKey = null, OnInvokeCallback onInvoke = null) : base(intentKey: intentKey) { D.assert(onInvoke != null); this.onInvoke = onInvoke; }
public UiWidgetAction(LocalKey intentKey) { D.assert(intentKey != null); this.intentKey = intentKey; }
protected override void OnTempestMessage(MessageEventArgs e) { switch (e.Message.MessageType) { case (ushort)TempestMessageType.AcknowledgeConnect: { var msg = (AcknowledgeConnectMessage)e.Message; this.serializer.Protocols = this.serializer.Protocols.Intersect(msg.EnabledProtocols); ConnectionId = msg.ConnectionId; this.remoteEncryption = new RSACrypto(); this.remoteEncryption.ImportKey((RSAAsymmetricKey)msg.PublicEncryptionKey); var encryption = new AesManaged { KeySize = 256 }; encryption.GenerateKey(); BufferValueWriter authKeyWriter = new BufferValueWriter(new byte[1600]); LocalKey.Serialize(this.serializer.SerializationContext, authKeyWriter, this.remoteEncryption); SendAsync(new FinalConnectMessage { AESKey = this.remoteEncryption.Encrypt(encryption.Key), PublicAuthenticationKeyType = LocalKey.GetType(), PublicAuthenticationKey = authKeyWriter.ToArray() }); this.serializer.AES = encryption; this.serializer.HMAC = new HMACSHA256(encryption.Key); break; } case (ushort)TempestMessageType.Connected: { var msg = (ConnectedMessage)e.Message; ConnectionId = msg.ConnectionId; this.formallyConnected = true; Timer t = Interlocked.Exchange(ref this.connectTimer, null); if (t != null) { t.Dispose(); } var tcs = Interlocked.Exchange(ref this.connectTcs, null); if (tcs != null) { if (tcs.TrySetResult(new ClientConnectionResult(ConnectionResult.Success, RemoteKey))) { OnConnected(); } } break; } default: base.OnTempestMessage(e); break; } }
public void Set(LocalKey key, TValue value) => Dictionary.Set(key, value);
public TValue Get(LocalKey key) => Dictionary.Get(key);
public override string ToString() { return(Enum.GetName(LocalKey.GetType(), LocalKey)); }
public Intent(LocalKey key) : base() { D.assert(key != null); this.key = key; }
public _RequestFocusActionBase(LocalKey name) : base(name) { }
public App() { LocalKey.Init(); }