Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove un-used GetAllIncludedFields #4600

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -106,26 +106,6 @@ private static List<FieldDeclarationSyntax> GetNonPublicIncludedFields(Definitio
return serializableFields;
}

/// <summary>
/// Get the field declarations for all fields which have been explicitly included in serialization
/// </summary>
/// <param name="extractionContext">The definition extraction context in which the extraction is being performed</param>
/// <param name="targetTypeDeclaration">The TypeDeclarationSyntax from which to extract the necessary data</param>
/// <returns>A readonly list of field declarations to be included in serialization</returns>
private static List<FieldDeclarationSyntax> GetAllIncludedFields(DefinitionExtractionContext extractionContext, TypeDeclarationSyntax targetTypeDeclaration)
{
List<FieldDeclarationSyntax> serializableFields;

// Get any private or protected fields that are opted in with the use of the [AutoSerialized] attribute
serializableFields = targetTypeDeclaration.Members.Where(
m => m is FieldDeclarationSyntax fieldDeclaration &&
extractionContext.IsFieldDecoratedWithAutoSerialized(fieldDeclaration))
.Cast<FieldDeclarationSyntax>()
.ToList();

return serializableFields;
}

/// <summary>
/// Determine if a field has one of the scopes requested by a caller
/// </summary>

Unchanged files with check annotations Beta

ItemWithAsynchRuleList items = ItemWithAsynchRuleList.GetListWithItems(dataPortal);
items[0].ValidationComplete += async (_, _) =>
{
Assert.IsFalse(items.IsBusy);

Check warning on line 148 in Source/Csla.test/BusyStatus/BusyStatusTests.cs

GitHub Actions / build

Do not assert inside 'async void' methods, local functions, or lambdas because they may not fail the test (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0040)

Check warning on line 148 in Source/Csla.test/BusyStatus/BusyStatusTests.cs

GitHub Actions / build

Do not assert inside 'async void' methods, local functions, or lambdas because they may not fail the test (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0040)
Assert.IsTrue(items.IsSavable);

Check warning on line 149 in Source/Csla.test/BusyStatus/BusyStatusTests.cs

GitHub Actions / build

Do not assert inside 'async void' methods, local functions, or lambdas because they may not fail the test (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0040)

Check warning on line 149 in Source/Csla.test/BusyStatus/BusyStatusTests.cs

GitHub Actions / build

Do not assert inside 'async void' methods, local functions, or lambdas because they may not fail the test (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0040)
items = await items.SaveAsync();
string actual = items[0].OperationResult;
Assert.AreEqual("DataPortal_Update", actual);

Check warning on line 152 in Source/Csla.test/BusyStatus/BusyStatusTests.cs

GitHub Actions / build

Do not assert inside 'async void' methods, local functions, or lambdas because they may not fail the test (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0040)

Check warning on line 152 in Source/Csla.test/BusyStatus/BusyStatusTests.cs

GitHub Actions / build

Do not assert inside 'async void' methods, local functions, or lambdas because they may not fail the test (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0040)
};
items[0].RuleField = "some value";
public void SetState(SerializationInfo info)
{
Email = info.GetValue<string>("Email");

Check warning on line 37 in Source/Csla.Generators/cs/AutoSerialization/Csla.Generator.AutoSerialization.CSharp.TestObjects/EmailAddress.cs

GitHub Actions / build

Possible null reference assignment.

Check warning on line 37 in Source/Csla.Generators/cs/AutoSerialization/Csla.Generator.AutoSerialization.CSharp.TestObjects/EmailAddress.cs

GitHub Actions / build

Possible null reference assignment.
}
}
}