42 references to TryGetContext
System.Windows.Forms.Design (42)
System\ComponentModel\Design\Serialization\CodeDomLocalizationProvider.cs (2)
115if (!manager.TryGetContext(out CodeDomLocalizationModel model)) 173if (!manager.TryGetContext(out PropertyDescriptor? serializingProperty) || !serializingProperty.IsLocalizable)
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (2)
171bool isPreset = manager.TryGetContext(out ExpressionContext? ctx) && ReferenceEquals(ctx.PresetValue, value); 326if (manager.TryGetContext(out RootContext? root) && root.Value == value)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (17)
342if (manager.TryGetContext(out RootContext? root) && root.Value == value) 530if (manager.TryGetContext(out RootContext? root) && root.Value == lhs) 676if (manager.TryGetContext(out RootContext? rootExp)) 1661if (manager.TryGetContext(out ExpressionTable? table)) 1669if (manager.TryGetContext(out RootContext? rootEx) && ReferenceEquals(rootEx.Value, value)) 1719if (manager.TryGetContext(out ExpressionContext? ctx) && ReferenceEquals(ctx.PresetValue, value)) 1733if (manager.TryGetContext(out ComponentCache? cache) && parentEntryComponent is not null && 1860if (manager.TryGetContext(out ExpressionTable? table)) 1882if (manager.TryGetContext(out ExpressionContext? ctx) && ReferenceEquals(ctx.PresetValue, value)) 1959if (manager.TryGetContext(out ExpressionContext? ctx)) 2085if (manager.TryGetContext(out ComponentCache.Entry? entry)) 2350if (manager.TryGetContext(out StatementContext? statementCtx)) 2430if (manager.TryGetContext(out LegacyExpressionTable? table)) 2447if (manager.TryGetContext(out RootContext? root)) 2500if (!manager.TryGetContext(out LegacyExpressionTable? table)) 2544if (manager.TryGetContext(out StatementContext? statementCtx)) 2590if (!manager.TryGetContext(out ExpressionTable? table))
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (6)
146if (manager.TryGetContext(out ExpressionContext? context) && context.PresetValue == value && 147manager.TryGetContext(out PropertyDescriptor? property) && property.PropertyType == context.ExpressionType) 421if (manager.TryGetContext(out ExpressionContext? context)) 515if (manager.TryGetContext(out ExpressionContext? ctx)) 591if (manager.TryGetContext(out ExpressionContext? ctx)) 667if (manager.TryGetContext(out SerializeAbsoluteContext? absolute) && absolute.ShouldSerialize(property))
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (1)
167if (!manager.TryGetContext(out ExpressionContext? expCtx) || expCtx.PresetValue != value)
System\ComponentModel\Design\Serialization\ContainerCodeDomSerializer.cs (2)
50if (manager.TryGetContext(out CodeTypeDeclaration? typeDecl) && manager.TryGetContext(out RootContext? rootCtx))
System\ComponentModel\Design\Serialization\PropertyMemberCodeDomSerializer.cs (1)
374if (manager.TryGetContext(out SerializeAbsoluteContext? absolute) && absolute.ShouldSerialize(propertyToSerialize))
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.cs (3)
170if (manager.TryGetContext(out ExpressionContext? tree)) 214if (!manager.TryGetContext(out SerializationResourceManager? sm)) 288if (manager.TryGetContext(out RootContext? rootCtx))
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (4)
74if (_manager.TryGetContext(out RootContext? rootCtx)) 142if (manager.TryGetContext(out ComponentCache.Entry? entry)) 674if (manager.TryGetContext(out PropertyDescriptor? prop)) 676if (manager.TryGetContext(out ExpressionContext? tree) && tree.Expression is CodePropertyReferenceExpression)
System\ComponentModel\Design\Serialization\ResourcePropertyMemberCodeDomSerializer.cs (2)
51if (manager.TryGetContext(out RootContext? rootCtx)) 110if (!manager.TryGetContext(out InheritanceAttribute? inheritance) && !TypeDescriptorHelper.TryGetAttribute(value, out inheritance))
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (1)
245else if (manager.TryGetContext(out RootContext? rootCtx) && codeObject is CodeExpression exp && rootCtx.Expression == exp)
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (1)
32if (manager.TryGetContext(out ExpressionContext? ctx) && ctx.Expression == targetExpression && ctx.Owner is IComponent comp)