2

Here is an ASP.NET Core nuget package decompiled by JustDecompile,I can't understand the usage of '<>c.<>9',I found that they have no declaration,it's very strange,the Nuget package name is 'Microsoft.Extensions.FileProviders.Physical' and the class file name is 'PhysicalFilesWatcher'.

QuinVon
  • 35
  • 8

1 Answers1

3

This is a part of some identifier in some compiler generated code. There are multiple language features in C# which are expanded by compiler into code, for example await's, auto-properties, yield return's, closures and others.

UPD

In this case based on my decompilation it seems that it is compiler generated code for this Action lambda:

private static readonly Action<object> _cancelTokenSource = state => ((CancellationTokenSource)state).Cancel();

Which is initialized in generated static constructor via something like this:

PhysicalFilesWatcher._cancelTokenSource = new Action<object>((object) PhysicalFilesWatcher.'<>c.<>9, __methodptr(<. cctor>b__43_0));

[CompilerGenerated]
[Serializable]
private sealed class <>c
{
  public static readonly PhysicalFilesWatcher.<>c <>9;

  static <>c()
  {
    PhysicalFilesWatcher.<>c <>9 = new PhysicalFilesWatcher.<>c();
  }

  public <>c()
  {
    base..ctor();
  }

  internal void <. cctor>b__43_0(object state)
  {
    ((CancellationTokenSource) state).Cancel();
  }
}
Guru Stron
  • 42,843
  • 5
  • 48
  • 70