1 implementation of IObjectCreationOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5915internal sealed partial class ObjectCreationOperation : Operation, IObjectCreationOperation
70 references to IObjectCreationOperation
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (1)
115IObjectCreationOperation o => o.Type,
ILLink.RoslynAnalyzer (3)
DataFlow\LocalDataFlowVisitor.cs (2)
702 public override TValue VisitObjectCreation (IObjectCreationOperation operation, LocalDataFlowState<TValue, TContext, TValueLattice, TContextLattice> state) 776 case IObjectCreationOperation callOperation:
TrimAnalysis\HandleCallAction.cs (1)
63 if (_operation is IObjectCreationOperation)
Microsoft.Analyzers.Extra (9)
CallAnalysis\Arrays.cs (1)
103static void HandleConstructor(OperationAnalysisContext context, IObjectCreationOperation op) => HandleSuspectType(context, (INamedTypeSymbol)op.Type!, op.Syntax.GetLocation());
CallAnalysis\CallAnalyzer.Handlers.cs (2)
84var op = (IObjectCreationOperation)context.Operation;
CallAnalysis\CallAnalyzer.Registrar.cs (3)
87public void RegisterConstructor(IMethodSymbol ctor, Action<OperationAnalysisContext, IObjectCreationOperation> action) 101public void RegisterConstructors(string typeName, Action<OperationAnalysisContext, IObjectCreationOperation> action) 109public void RegisterConstructors(string[] typeNames, Action<OperationAnalysisContext, IObjectCreationOperation> action)
CallAnalysis\CallAnalyzer.State.cs (1)
17public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IObjectCreationOperation>>> Ctors = new(SymbolEqualityComparer.Default);
CallAnalysis\LegacyCollection.cs (1)
31static void HandleConstructor(OperationAnalysisContext context, IObjectCreationOperation op)
CallAnalysis\ValueTuple.cs (1)
46static void HandleConstructor(OperationAnalysisContext context, IObjectCreationOperation op)
Microsoft.Analyzers.Local (9)
CallAnalysis\CallAnalyzer.Handlers.cs (3)
84var op = (IObjectCreationOperation)context.Operation; 118if (convOp.Operand is IObjectCreationOperation creationOp)
CallAnalysis\CallAnalyzer.Registrar.cs (3)
87public void RegisterConstructor(IMethodSymbol ctor, Action<OperationAnalysisContext, IObjectCreationOperation> action) 101public void RegisterConstructors(string typeName, Action<OperationAnalysisContext, IObjectCreationOperation> action) 109public void RegisterConstructors(string[] typeNames, Action<OperationAnalysisContext, IObjectCreationOperation> action)
CallAnalysis\CallAnalyzer.State.cs (1)
17public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IObjectCreationOperation>>> Ctors = new(SymbolEqualityComparer.Default);
CallAnalysis\Throws.cs (2)
31var creationOp = (IObjectCreationOperation?)convOp?.Operand;
Microsoft.AspNetCore.Components.Analyzers (1)
InternalUsageAnalyzer.cs (1)
63IObjectCreationOperation creation => creation.Constructor,
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
InternalUsageAnalyzer.cs (1)
63IObjectCreationOperation creation => creation.Constructor,
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ActualApiResponseMetadataFactory.cs (1)
128case IObjectCreationOperation creation:
Microsoft.CodeAnalysis (9)
Generated\OperationKind.Generated.cs (1)
94/// <summary>Indicates an <see cref="IObjectCreationOperation"/>.</summary>
Generated\Operations.Generated.cs (5)
3641/// The construction of the interpolated string handler instance. This can be an <see cref="IObjectCreationOperation" /> for valid code, and 3893/// The operation representing the attribute. This can be a <see cref="IObjectCreationOperation" /> in non-error cases, or an <see cref="IInvalidOperation" /> in error cases. 10966public override IOperation VisitObjectCreation(IObjectCreationOperation operation, object? argument) 11450public virtual void VisitObjectCreation(IObjectCreationOperation operation) => DefaultVisit(operation); 11589public virtual TResult? VisitObjectCreation(IObjectCreationOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (3)
5980public override IOperation VisitObjectCreation(IObjectCreationOperation operation, int? captureIdForResult) 6811Debug.Assert(operation.HandlerCreation is IObjectCreationOperation); 6813var arguments = ((IObjectCreationOperation)operation.HandlerCreation).Arguments;
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
52if (operation is not IObjectCreationOperation { Initializer: { } initializerOperation })
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
461var constructor = ((IObjectCreationOperation)operationContext.Operation).Constructor?.OriginalDefinition;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
453throwOperation.Exception.UnwrapImplicitConversion() is IObjectCreationOperation objectCreation &&
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
248=> value.UnwrapImplicitConversion() is IObjectCreationOperation { Type.SpecialType: SpecialType.System_Object };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1426if (operation is IObjectCreationOperation)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
506if (operation is not IObjectCreationOperation objectCreationOperation)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
361IObjectCreationOperation operation, 371if (operation is IObjectCreationOperation
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
248=> value.UnwrapImplicitConversion() is IObjectCreationOperation { Type.SpecialType: SpecialType.System_Object };
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
506if (operation is not IObjectCreationOperation objectCreationOperation)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
361IObjectCreationOperation operation, 371if (operation is IObjectCreationOperation
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1426if (operation is IObjectCreationOperation)
Microsoft.CodeAnalysis.Features (5)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
52if (operation is not IObjectCreationOperation { Initializer: { } initializerOperation })
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
461var constructor = ((IObjectCreationOperation)operationContext.Operation).Constructor?.OriginalDefinition;
ValueTracking\ValueTracker.FindReferencesProgress.cs (1)
158if (operation is not IObjectCreationOperation)
ValueTracking\ValueTracker.OperationCollector.cs (2)
27IObjectCreationOperation objectCreationOperation => VisitObjectCreationAsync(objectCreationOperation, cancellationToken), 101private Task VisitObjectCreationAsync(IObjectCreationOperation objectCreationOperation, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\ControlFlowGraphVerifier.cs (1)
906Parent: IObjectCreationOperation
Compilation\OperationTreeVerifier.cs (2)
1439public override void VisitObjectCreation(IObjectCreationOperation operation) 1441LogString(nameof(IObjectCreationOperation));
Compilation\TestOperationVisitor.cs (2)
1020public override void VisitObjectCreation(IObjectCreationOperation operation) 1323Assert.True(operation.HandlerCreation is IObjectCreationOperation or IDynamicObjectCreationOperation or IInvalidOperation);
Diagnostics\OperationTestAnalyzer.cs (2)
1122IObjectCreationOperation creation = (IObjectCreationOperation)operationContext.Operation;
Microsoft.CodeAnalysis.Workspaces (2)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (1)
676if (operation is IObjectCreationOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
453throwOperation.Exception.UnwrapImplicitConversion() is IObjectCreationOperation objectCreation &&
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\ComHostingDoesNotSupportGeneratedComInterfaceAnalyzer.cs (1)
44if (attr.Operation is not IObjectCreationOperation ctor
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (1)
28public static IArgumentOperation? GetArgumentByOrdinal(this IObjectCreationOperation operation, int ordinal)
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (1)
645if (attr.Operation is IObjectCreationOperation attrCreation
Analyzers\NativeMarshallingAttributeAnalyzer.cs (1)
87if (attr.Operation is IObjectCreationOperation attrCreation
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (1)
28public static IArgumentOperation? GetArgumentByOrdinal(this IObjectCreationOperation operation, int ordinal)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (1)
28public static IArgumentOperation? GetArgumentByOrdinal(this IObjectCreationOperation operation, int ordinal)
System.Text.RegularExpressions.Generator (3)
UpgradeToGeneratedRegexAnalyzer.cs (2)
125IObjectCreationOperation operation = (IObjectCreationOperation)context.Operation;
UpgradeToGeneratedRegexCodeFixer.cs (1)
173operationArguments = ((IObjectCreationOperation)operation).Arguments;