1 write to Properties
Microsoft.AspNetCore.Components.Forms (1)
EditContext.cs (1)
32
Properties
= new EditContextProperties();
21 references to Properties
Microsoft.AspNetCore.Components.Forms.Tests (17)
EditContextTest.cs (17)
281
Assert.Throws<KeyNotFoundException>(() => editContext.
Properties
[key1]);
284
editContext.
Properties
[key1] = value1;
285
editContext.
Properties
[key2] = value2;
286
Assert.Same(value1, editContext.
Properties
[key1]);
287
Assert.Same(value2, editContext.
Properties
[key2]);
290
Assert.Throws<KeyNotFoundException>(() => editContext.
Properties
[key3]);
305
Assert.False(editContext.
Properties
.TryGetValue(key1, out _));
308
editContext.
Properties
[key1] = value1;
309
editContext.
Properties
[key2] = value2;
310
Assert.True(editContext.
Properties
.TryGetValue(key1, out var retrievedValue1));
311
Assert.True(editContext.
Properties
.TryGetValue(key2, out var retrievedValue2));
316
Assert.False(editContext.
Properties
.TryGetValue(key3, out _));
326
editContext.
Properties
[key] = value;
329
var resultForExistingKey = editContext.
Properties
.Remove(key);
330
var resultForNonExistingKey = editContext.
Properties
.Remove(new object());
335
Assert.False(editContext.
Properties
.TryGetValue(key, out _));
336
Assert.Throws<KeyNotFoundException>(() => editContext.
Properties
[key]);
Microsoft.AspNetCore.Components.Web (4)
Forms\EditContextFieldClassExtensions.cs (2)
34
var provider = editContext.
Properties
.TryGetValue(FieldCssClassProviderKey, out var customProvider)
51
editContext.
Properties
[FieldCssClassProviderKey] = fieldCssClassProvider;
Forms\Mapping\EditContextFormMappingExtensions.cs (2)
17
context.
Properties
[_key] = mappingContext;
27
if (context.
Properties
.TryGetValue(_key, out var result) && result is FormMappingContext mappingContext)