Skip to content

Instantly share code, notes, and snippets.

@conwid
conwid / 02 applymodel
Created May 19, 2025 19:48
Gist created from visual studio extension
public class ApplyModel
{
public string Name { get; set; }
public string Role { get; set; }
public string Credentials { get; set; }
}
@conwid
conwid / 01 nuget packages
Created May 19, 2025 19:44
Gist created from visual studio extension
<ItemGroup>
<PackageReference Include="SmartComponents.AspNetCore" Version="0.1.0-preview10147" />
<PackageReference Include="SmartComponents.Inference.OpenAI" Version="0.1.0-preview10147" />
<PackageReference Include="SmartComponents.LocalEmbeddings" Version="0.1.0-preview10147" />
</ItemGroup>
@conwid
conwid / IniFormatter.cs
Last active May 16, 2023 14:37
More complete IFormatter implementation reference for students preparing for MS 70-483
public class IniFormatter : IFormatter
{
public class IniTypeBinder : SerializationBinder
{
public override Type BindToType(string assemblyName, string typeName) => Type.GetType(typeName.Split('=')[1]);
public override void BindToName(Type serializedType, out string assemblyName, out string typeName)
{
assemblyName = $"{IniFormatter.AssemblyNameKey}={serializedType.Assembly.FullName}";
typeName = $"{IniFormatter.ClassNameKey}={serializedType.AssemblyQualifiedName}";
}