RSCG_WhatIAmDoing_Common 8.2024.10316.2035
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package RSCG_WhatIAmDoing_Common --version 8.2024.10316.2035
NuGet\Install-Package RSCG_WhatIAmDoing_Common -Version 8.2024.10316.2035
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RSCG_WhatIAmDoing_Common" Version="8.2024.10316.2035" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RSCG_WhatIAmDoing_Common --version 8.2024.10316.2035
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RSCG_WhatIAmDoing_Common, 8.2024.10316.2035"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RSCG_WhatIAmDoing_Common as a Cake Addin #addin nuget:?package=RSCG_WhatIAmDoing_Common&version=8.2024.10316.2035 // Install RSCG_WhatIAmDoing_Common as a Cake Tool #tool nuget:?package=RSCG_WhatIAmDoing_Common&version=8.2024.10316.2035
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RSCG_WhatIAmDoing
Instrument C# software on CI to find what the software is doing.
Introduction
Decide what you want to monitor ... and then monitor it.
Example
Packages
Add the following into the csproj you want to be monitores
<ItemGroup>
<PackageReference Include="RSCG_WhatIAmDoing" Version="8.2024.10316.2035" />
<PackageReference Include="RSCG_WhatIAmDoing_Common" Version="8.2024.10316.2035" />
</ItemGroup>
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);RSCG_InterceptorTemplate</InterceptorsPreviewNamespaces>
</PropertyGroup>
Code
Intercept static methods
Assume that you want to monitor all calls to System.Console
//[ExposeClass(typeof(Encoding), nameof(Encoding.EncodingName))]
//[InterceptStatic("System.IO.File.*ts")]
//[InterceptStatic("System.IO.File.*")]
[InterceptStatic("System.Console.*")] // regex
//[InterceptStatic("WIAD_DemoConsole.Fib.*")]
internal class InterceptorMethodStatic : InterceptorMethodStaticBase, IInterceptorMethodStatic
{
}
Intercept instance methods
Assume that you want to monitor all calls to any method of any instance of Person
//[InterceptInstanceClass(typeof(Person),"ame")]
//[InterceptInstanceClass(typeof(Person), "parat")]
//[InterceptInstanceClass(typeof(Person), "ncodi")]
[InterceptInstanceClass(typeof(Person), ".*")] //regex
public class InterceptorMethodInstanceClass: InterceptorMethodInstanceClassBase, IInterceptorMethodInstanceClass
{
public InterceptorMethodInstanceClass()
{
}
}
See the results
var data= CachingData.Methods().ToArray();
foreach (var item in data)
{
WriteLine($"Method {item.typeAndMethodData.MethodName} from class {item.typeAndMethodData.TypeOfClass} Time: {item.StartedAtDate} state {item.State} ");
WriteLine($" =>Arguments: {item.ArgumentsAsString()}");
if ((item.State & AccumulatedStateMethod.HasResult) == AccumulatedStateMethod.HasResult)
{
WriteLine($" =>Result: {item.Result}");
}
}
More details
If you want to implement YOUR interception , implement the following interfaces
IInterceptorMethodInstanceClass
IInterceptorMethodStatic
License
MIT
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Extensions.Caching.Memory (>= 8.0.0)
- RSCG_WhatIAmDoing (>= 8.2024.10316.2035)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.2024.10405.851 | 464 | 4/5/2024 |
8.2024.10404.2057 | 126 | 4/4/2024 |
8.2024.10402.2257 | 119 | 4/2/2024 |
8.2024.10402.810 | 118 | 4/2/2024 |
8.2024.10401.810 | 137 | 4/1/2024 |
8.2024.10321.810 | 118 | 3/31/2024 |
8.2024.10316.2235 | 136 | 3/16/2024 |
8.2024.10316.2035 | 131 | 3/16/2024 |
8.2024.10201.735 | 145 | 2/1/2024 |
8.2024.10131.11824 | 116 | 1/31/2024 |