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