profile
viewpoint
Youssef Victor Youssef1313 Alexandria, Egypt https://www.linkedin.com/in/youssef1313/ Microsoft MVP, Student, .NET Developer, Love C# & .NET, OSS Contributor. Looking for an internship

Youssef1313/aspnetcore 1

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Youssef1313/C-DataStructure-And-Algorithms 1

Generic data structures and algorithms implemented in c language.

Youssef1313/AML 0

Automated Deep learning & Machine Learning in JavaScript, in browser locally or in node.

Youssef1313/ApiDocs 0

Reference documentation for ASP.NET Core APIs

Youssef1313/apple-api-docs 0

Xamarin.iOS & Xamarin.Mac API documentation in ECMA XML format

Youssef1313/arcade 0

Tools that provide common build infrastructure for multiple .NET Foundation projects.

Youssef1313/aspnetcore-tooling 0

Tools for ASP.NET Core apps, such as MSBuild targets, Visual Studio extensions, and command line tools. (Open issues on https://github.com/dotnet/aspnetcore/issues)

PR opened dotnet/roslyn

Fix ParameterSyntax.Update to account for '!!'

Fixes #58597

cc @RikkiGibson

+11 -5

0 comment

2 changed files

pr created time in 14 minutes

push eventYoussef1313/roslyn

Youssef1313

commit sha 1022a43deebbb0838f4e7a4b72b02d3a5ed8921a

Fix ParameterSyntax.Update to account for '!!'

view details

push time in 14 minutes

create barnchYoussef1313/roslyn

branch : parametersyntax-update

created branch time in 15 minutes

push eventYoussef1313/roslyn

Joey Robichaud

commit sha d0f3d8629720c4c05f0a810c70a38b0db4fd1fc6

Merge pull request #57822 from JoeRobich/update-to-net6.0GA-main Use the .NET 6.0 SDK for building (Arcade7)

view details

dotnet bot

commit sha 07dc4fd8cc7047b51c7bf51fec01c5946832fc6a

Merge pull request #57897 from dotnet/merges/main-to-main-vs-deps Merge main to main-vs-deps

view details

dotnet-maestro[bot]

commit sha e9ce0efdb409c2cb13f80867d3ac9345f995ea27

Update dependencies from https://github.com/dotnet/arcade build 20211119.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.21566.10 -> To Version 7.0.0-beta.21569.2

view details

dotnet-maestro[bot]

commit sha 681e97a3cc57da854e74f8d0473efddafcc78b80

Update dependencies from https://github.com/dotnet/arcade build 20211119.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.21566.10 -> To Version 7.0.0-beta.21569.2

view details

Cyrus Najmabadi

commit sha 703bb7e21fa8ed127ad64d1cbae0d742e3135387

Use simple using statement

view details

Cyrus Najmabadi

commit sha a22525d9b950fe7e0b59e32cc92de1c4441468c1

Use nrt and an internal state object

view details

Julien Couvreur

commit sha 09bc67a16cd07cd642b7ab4c7e316e62cd0921ff

List-patterns: factor binding logic (#57318) Co-authored-by: AlekseyTs <AlekseyTs@users.noreply.github.com> This changes the bound tree representation of list patterns, slice patterns and implicit indexer accesses to avoid storing property or method symbols. Instead we store BoundIndexerAccess/BoundArrayAccess/BoundCall, which be obtain from existing "Bind*" methods and that we run through `CheckValue`. This ensures that we're not missing on all the validation rules which those include. We intend to do some further refactoring, allowing `CheckValue` to properly deal with placeholders. This will allow us to store the Receiver separately from the IndexerOrSliceAccess and leverage existing placeholder infrastructure.

view details

David Wengier

commit sha 33b168ec366b7f120a469c06f69164ac3d28eb9b

Don't offer to simply to an alias if it has a different meaning (#57001)

view details

CyrusNajmabadi

commit sha f2c231a5c0fe01faf0ea06bb5ee29c16c82f2300

Merge pull request #57835 from CyrusNajmabadi/addBracesTopLevel Fix add-braces crash in top-level

view details

CyrusNajmabadi

commit sha fa2e3cae066bb1bab4297330a529d060fc90468e

Merge pull request #57836 from CyrusNajmabadi/sqliteAuthoring Simplify sqlite authoring now that we're 64bit only

view details

CyrusNajmabadi

commit sha 897b786a2fb9d09aa96e8239581960127fa156a5

Merge pull request #57890 from CyrusNajmabadi/farGlobalSuppress Search less files when searching in global suppressions.

view details

Shen Chen

commit sha 623be72d94218997c377071912377c0d48f49df9

Merge pull request #57795 from Cosifne/dev/shech/ResourcesFix Change the title of configure severity to resources file

view details

CyrusNajmabadi

commit sha b7dfd95a7319a4a669020d7a2aca33b7f51b7a12

Update src/Features/Core/Portable/ReplacePropertyWithMethods/ReplacePropertyWithMethodsCodeRefactoringProvider.cs

view details

CyrusNajmabadi

commit sha 01f2b0b2e3e7a777837d29a94bedee34fd565349

Update src/Features/Core/Portable/ReplacePropertyWithMethods/ReplacePropertyWithMethodsCodeRefactoringProvider.cs

view details

dotnet bot

commit sha a40c64750c17207587e267848135ef9563bf8bc6

Merge pull request #57904 from dotnet/merges/main-to-main-vs-deps Merge main to main-vs-deps

view details

Julien Couvreur

commit sha 0d661e94f133d110606a79e52140d6dc87151e59

Merge pull request #57905 from dotnet/merges/main-to-features/list-patterns Merge main to features/list-patterns

view details

CyrusNajmabadi

commit sha adbdb984505646e494325c561bf56c3a6c3b0d63

Merge pull request #57891 from CyrusNajmabadi/replacePropWithMethodLinkedFile Fix replace-prop-with-method (and the opposite) when references are in linked files.

view details

CyrusNajmabadi

commit sha 88fdda9a7170c0a416fcc11f082276e36a865f97

Update src/VisualStudio/Core/Def/Implementation/FindReferences/StreamingFindUsagesPresenter.cs Co-authored-by: Marius Ungureanu <therzok@gmail.com>

view details

David Wengier

commit sha d39d68cb3e3068f069a6c5d55a327c2f5d1581ef

[SourceLink] Use correct encoding for embedded text (#57683)

view details

CyrusNajmabadi

commit sha 2e26701b0d1cb1a902a24f4ad8b8c5fe70514581

Merge pull request #57861 from CyrusNajmabadi/gotoImplPumping Switch go-to-impl to be entirely async/non-blocking.

view details

push time in 25 minutes

pull request commentdotnet/roslyn

Fix ParseVBErrorOrWarning

Sorry for the delay here. The last commit should hopefully pass CI.

Youssef1313

comment created time in 30 minutes

push eventYoussef1313/roslyn

Cyrus Najmabadi

commit sha d567c5c3badb3e94b13f67459e3fac49eca009c3

Initial analyzer

view details

Cyrus Najmabadi

commit sha 4ed7e99a55b87a29a6aa38ce30607ca4c981bbd8

Add fixer

view details

Cyrus Najmabadi

commit sha 6d136664db04b6a1d1e4306ac66ae5f0fc1b4588

Update tests

view details

Cyrus Najmabadi

commit sha 2b5f27015e19895434937f3d3fa438e11a17ac20

Tweak tests

view details

Cyrus Najmabadi

commit sha 6a6798ce2678d76fe96252381573c17a286205e1

Fixed

view details

Cyrus Najmabadi

commit sha e8f75818cff062d2616c74a0b4190266dab22661

Add tests

view details

Cyrus Najmabadi

commit sha a5cb30bb50d23789c617bd1ed53cb470a24700a5

Add tests

view details

Cyrus Najmabadi

commit sha 3135be292848ba44a8d50af2676da3979c1ed775

Add tests

view details

Cyrus Najmabadi

commit sha ed72724e9e9d29baa464db3e2a627521cae15e88

Add tests

view details

Cyrus Najmabadi

commit sha 28f73b2ac38426baacb922ae93ec72df2d3a295e

Fade correct spans

view details

Cyrus Najmabadi

commit sha f2d9a5c810a718df6ecdcebe0d5c20230c2c3938

Add option to control this feature.

view details

Cyrus Najmabadi

commit sha 2cc6d9f57751e37a1ac98c3028d84d8c3a52b64f

Add test

view details

CyrusNajmabadi

commit sha e9d5ce75c0e5ccc5eb6032a6fb2fb87e85420cc3

Update src/Features/CSharp/Portable/RemoveUnnecessaryLambdaExpression/CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>

view details

CyrusNajmabadi

commit sha 469086a103e34a9871ecadb88e9860c1affb5d9b

Update src/Compilers/Test/Core/Traits/Traits.cs Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>

view details

Cyrus Najmabadi

commit sha 56305c65b8ab24a2c1144e83b19b12d5498766c6

NRT

view details

Cyrus Najmabadi

commit sha 9f735e81d43fe8a19185e313d54217c35d0c238e

Merge branch 'simplifyLambda' of https://github.com/CyrusNajmabadi/roslyn into simplifyLambda

view details

Cyrus Najmabadi

commit sha 849e5760c42e8feee0fad10285d7372ed9933076

Add option

view details

Cyrus Najmabadi

commit sha 08752166a533f1014eda0f58a05db1abc27a329f

Add automation object

view details

Cyrus Najmabadi

commit sha fbf79ae50844b84dc5f5518933e8783039ef5de1

Fix issue with generics

view details

Cyrus Najmabadi

commit sha 1f39dfdca83e4ed55af812c298c204bf72f8bc50

Make side effect logic more conservative

view details

push time in an hour

PR opened dotnet/roslyn

draft

As usual, to see what this affects.

+1 -1

0 comment

1 changed file

pr created time in an hour

push eventYoussef1313/roslyn

Youssef Victor

commit sha 20e50dc2b90e9e3900e4b0b3c16ae2c28b7a0e47

draft

view details

push time in an hour

push eventYoussef1313/roslyn

Youssef Victor

commit sha a77a092f250a968466b59e8c7852786c23f70c81

Update MoveStaticMembersViewModelTest.vb

view details

push time in an hour

push eventYoussef1313/roslyn

Youssef Victor

commit sha 32d502afbf3888895c46e65152ecbadeaf31d6ae

Update CodeDefinitionWindow_InProc.cs

view details

push time in an hour

Pull request review commentdotnet/roslyn

[semi-auto-props]: Refactor and rename 'AccessingAutoPropertyFromConstructor'

 private DiagnosticInfo GetBadEventUsageDiagnosticInfo(EventSymbol eventSymbol)                 new CSDiagnosticInfo(ErrorCode.ERR_BadEventUsageNoField, leastOverridden);         } -        internal static bool AccessingAutoPropertyFromConstructor(BoundPropertyAccess propertyAccess, Symbol fromMember)+        internal static bool IsReadingThroughBackingFieldInConstructor(BoundPropertyAccess propertyAccess, Symbol fromMember)         {-            return AccessingAutoPropertyFromConstructor(propertyAccess.ReceiverOpt, propertyAccess.PropertySymbol, fromMember);+            var propertySymbol = propertyAccess.PropertySymbol;+            var receiver = propertyAccess.ReceiverOpt;+            if (!propertySymbol.IsDefinition && propertySymbol.ContainingType.Equals(propertySymbol.ContainingType.OriginalDefinition, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes))+            {+                propertySymbol = propertySymbol.OriginalDefinition;+            }++            return propertySymbol is SourcePropertySymbolBase sourceProperty &&+                sourceProperty.GetMethod is SourcePropertyAccessorSymbol { IsEquivalentToBackingFieldAccess: true } &&+                TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.ConsiderEverything2) &&+                    IsConstructorOrField(fromMember, isStatic: sourceProperty.IsStatic) &&+                    (sourceProperty.IsStatic || receiver.Kind == BoundKind.ThisReference);+        }++        internal static bool IsPropertyAssignedThroughBackingField(BoundPropertyAccess propertyAccess, Symbol fromMember)+        {+            return IsPropertyAssignedThroughBackingField(propertyAccess.ReceiverOpt, propertyAccess.PropertySymbol, fromMember);         } -        private static bool AccessingAutoPropertyFromConstructor(BoundExpression receiver, PropertySymbol propertySymbol, Symbol fromMember)+        /// <summary>+        /// Determines whether a property is assigned through the backing field within a symbol <paramref name="fromMember"/>+        /// </summary>+        /// <remarks>+        /// A property is assigned through backing field within a constructor or a field assignment.+        /// </remarks>+        private static bool IsPropertyAssignedThroughBackingField(BoundExpression receiver, PropertySymbol propertySymbol, Symbol fromMember)         {             if (!propertySymbol.IsDefinition && propertySymbol.ContainingType.Equals(propertySymbol.ContainingType.OriginalDefinition, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes))             {                 propertySymbol = propertySymbol.OriginalDefinition;             } -            var sourceProperty = propertySymbol as SourcePropertySymbolBase;-            var propertyIsStatic = propertySymbol.IsStatic;+            // PROTOTYPE(semi-auto-props): TODO: Support assigning semi auto prop from constructors. -            return (object)sourceProperty != null &&-                    sourceProperty.IsAutoPropertyWithGetAccessor &&+            return propertySymbol is SourcePropertySymbolBase sourceProperty &&+                    sourceProperty.GetMethod is not null &&+                    // To be assigned through backing field, either SetMethod is null, or it's equivalent to backing field write+                    // PROTOTYPE(semi-auto-props): TODO: Do we need to use `GetOwnOrInheritedSetMethod` instead of `SetMethod`? Add tests.+                    sourceProperty.SetMethod is not SourcePropertyAccessorSymbol { IsEquivalentToBackingFieldAccess: false } &&                     TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.ConsiderEverything2) &&-                    IsConstructorOrField(fromMember, isStatic: propertyIsStatic) &&-                    (propertyIsStatic || receiver.Kind == BoundKind.ThisReference);+                    IsConstructorOrField(fromMember, isStatic: sourceProperty.IsStatic) &&+                    (sourceProperty.IsStatic || receiver.Kind == BoundKind.ThisReference);         }

Looks like this will return false for a read/write old-style auto property like public int P { get; set; } if we're not in constructor. This looks unexpected given the method name. @AlekseyTs Should I get back the "InConstructor" suffix in the method name? Or is there something I'm missing here?

Youssef1313

comment created time in an hour

PullRequestReviewEvent

Pull request review commentdotnet/roslyn

[semi-auto-props]: Refactor and rename 'AccessingAutoPropertyFromConstructor'

 private DiagnosticInfo GetBadEventUsageDiagnosticInfo(EventSymbol eventSymbol)                 new CSDiagnosticInfo(ErrorCode.ERR_BadEventUsageNoField, leastOverridden);         } +        internal static bool IsReadingThroughBackingFieldInConstructor(BoundPropertyAccess propertyAccess, Symbol fromMember)

I'm not sure the name is accurate.

Also regarding the "InConstructor" part. I added it since this will return false for a readonly old-style auto property if we're not in constructor, but will return true if we're in constructor.

Youssef1313

comment created time in an hour

PullRequestReviewEvent

Pull request review commentdotnet/roslyn

[semi-auto-props]: Refactor and rename 'AccessingAutoPropertyFromConstructor'

 private DiagnosticInfo GetBadEventUsageDiagnosticInfo(EventSymbol eventSymbol)                 new CSDiagnosticInfo(ErrorCode.ERR_BadEventUsageNoField, leastOverridden);         } +        internal static bool IsReadingThroughBackingFieldInConstructor(BoundPropertyAccess propertyAccess, Symbol fromMember)

The "InConstructor" in the method name here looks important to me. A readonly auto property will always return true if we dropped "InConstructor" from the name, but that's not the behavior that callers are expecting.

Youssef1313

comment created time in an hour

PullRequestReviewEvent

push eventYoussef1313/roslyn

Youssef1313

commit sha e37d8c7e62c2463176e9a252894f9c477fd3ede4

Address some more feedback, add DFA tests

view details

push time in an hour

delete branch Youssef1313/roslyn

delete branch : patch-9

delete time in 2 hours

PR closed dotnet/roslyn

draft Area-Compilers Community

To get an idea what this affects.

+0 -10

0 comment

1 changed file

Youssef1313

pr closed time in 2 hours

PR opened dotnet/roslyn

draft

To get an idea what this affects.

+0 -10

0 comment

1 changed file

pr created time in 2 hours

push eventYoussef1313/roslyn

Youssef Victor

commit sha cd4afdb37b741d34cf94cf05af16a1c4a6bb0947

draft

view details

push time in 2 hours

create barnchYoussef1313/roslyn

branch : test-dfa

created branch time in 3 hours

push eventYoussef1313/roslyn-analyzers

Youssef Victor

commit sha 0b78165a20656a6fae49672072f6778ff88a74dc

Update RulesMissingDocumentation.md

view details

push time in 3 hours

pull request commentdotnet/roslyn-analyzers

Implement 'Enum values should be monotonically increasing'

@stephentoub In that case, can you move https://github.com/dotnet/roslyn-analyzers/issues/5783 to dotnet/runtime? Thanks!

Meanwhile, if it's going to take long for the analyzer to be approved, we can move this analyzer to Roslyn.Diagnostics.Analyzers package, which is intended to only be used by Roslyn.

Youssef1313

comment created time in 3 hours

issue commentdotnet/roslyn

[bug] xml docs generics+`inheritdoc`+`typeparamref`

@ZacharyPattern I'm not able to reproduce. Maybe my code has something different that I can't notice? 😄

image

Code I used:

internal class C
{
    public static void M()
    {
        var a = new Test<int>();
        var b = a.Clone();
    }
}
internal class Test<T> : ICloneable<Test<T>>
{
    /// <inheritdoc/>
    public Test<T> Clone() => new();
}
/// <summary>A type that has clonable instances.</summary>
/// <typeparam name="T">The type of instances that can be cloned.</typeparam>
internal interface ICloneable<T>
{
    /// <summary>Clones a <typeparamref name="T"/>.</summary>
    /// <returns>A clone of the <typeparamref name="T"/>.</returns>
    T Clone();
}

The behavior isn't ideal that we show <T> while we should be aware of what T is, but not that bad.

ZacharyPatten

comment created time in 4 hours

push eventYoussef1313/roslyn

Youssef1313

commit sha a91f1cd06756deec9b65ad2e524f5eb5d17d1da9

Retain old behavior

view details

push time in 5 hours

Pull request review commentdotnet/roslyn

[semi-auto-props]: Refactor and rename 'AccessingAutoPropertyFromConstructor'

 private DiagnosticInfo GetBadEventUsageDiagnosticInfo(EventSymbol eventSymbol)                 new CSDiagnosticInfo(ErrorCode.ERR_BadEventUsageNoField, leastOverridden);         } -        internal static bool AccessingAutoPropertyFromConstructor(BoundPropertyAccess propertyAccess, Symbol fromMember)+        internal static bool IsPropertyAssignedThroughBackingField(BoundPropertyAccess propertyAccess, Symbol fromMember)         {-            return AccessingAutoPropertyFromConstructor(propertyAccess.ReceiverOpt, propertyAccess.PropertySymbol, fromMember);+            return IsPropertyAssignedThroughBackingField(propertyAccess.ReceiverOpt, propertyAccess.PropertySymbol, fromMember);         } -        private static bool AccessingAutoPropertyFromConstructor(BoundExpression receiver, PropertySymbol propertySymbol, Symbol fromMember)+        /// <summary>+        /// Determines whether a property is assigned through the backing field within a symbol <paramref name="fromMember"/>+        /// </summary>+        /// <remarks>+        /// A property is assigned through backing field within a constructor or a field assignment.+        /// </remarks>+        private static bool IsPropertyAssignedThroughBackingField(BoundExpression receiver, PropertySymbol propertySymbol, Symbol fromMember)

I'll retain the old behavior for now since this is meant to be a refactoring only, so no behavioral changes should be observed.

Youssef1313

comment created time in 5 hours

PullRequestReviewEvent

push eventYoussef1313/roslyn

Youssef1313

commit sha d268b40dbc0d347c40353afc69fccc71dbf58490

Update test

view details

push time in 5 hours

delete branch Youssef1313/csharplang

delete branch : patch-2

delete time in 5 hours

more