C# 클래스 SingleFileGenerator.InstallForm

Installer window designed to for Single-File Generators. This code works for *any* SFG defined in the assembly given to the constructor; it does not depend on LLLPG specifically and it will work without changes on any other assembly that contains SFGs.
NOTE: correct registration requires that this installer be run from an x86 executable. Although a program written in .NET for "AnyCPU" works in both 32-bit and 64-bit, we use the System.Runtime.InteropServices.RegistrationServices class to register the assembly with COM. Unfortunately, if the installer is built as AnyCPU, RegistrationServices will only register the module as 64-bit, not 32-bit. Since Visual Studio is 32-bit, it won't be able to find our SFG. To fix this problem, build the installer as "x86" (32-bit). An alternate solution would be to invoke the 32-bit version of the command-line tool regasm.exe /codebase. This may be installed at C:\Windows\Microsoft.NET\Framework\v4.0.30319 but this could vary by Windows version (and certainly varies by .NET version).
상속: System.Windows.Forms.Form
파일 보기 프로젝트 열기: qwertie/ecsharp

공개 메소드들

메소드 설명
InstallForm ( Assembly sfgAssembly ) : System
RegisterSingleFileGenerators ( IMessageSink sink, Assembly assembly, RegistryKey rootKey, string generatorsKey, bool unregister = false ) : bool

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnLoad ( EventArgs e ) : void

비공개 메소드들

메소드 설명
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

InstallForm_Load ( object sender, EventArgs e ) : void
Main ( ) : void
MessageBoxWriter ( Severity type, object context, string msg, object args ) : void
PathForWow64 ( string path ) : string
RegisterOrUnregister ( IMessageSink sink, bool unregister ) : int
SetValue ( RegistryKey key, string name, object value ) : void
btnRegister_Click ( object sender, EventArgs e ) : void
btnUnregister_Click ( object sender, EventArgs e ) : void

메소드 상세

Dispose() 보호된 메소드

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
리턴 void

InstallForm() 공개 메소드

public InstallForm ( Assembly sfgAssembly ) : System
sfgAssembly System.Reflection.Assembly
리턴 System

OnLoad() 보호된 메소드

protected OnLoad ( EventArgs e ) : void
e System.EventArgs
리턴 void

RegisterSingleFileGenerators() 공개 정적인 메소드

public static RegisterSingleFileGenerators ( IMessageSink sink, Assembly assembly, RegistryKey rootKey, string generatorsKey, bool unregister = false ) : bool
sink IMessageSink
assembly System.Reflection.Assembly
rootKey Microsoft.Win32.RegistryKey
generatorsKey string
unregister bool
리턴 bool