LicFileLicenseProvider.GetLicense 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
사용 가능한 경우 구성 요소 인스턴스에 대한 라이선스를 반환합니다.
public:
override System::ComponentModel::License ^ GetLicense(System::ComponentModel::LicenseContext ^ context, Type ^ type, System::Object ^ instance, bool allowExceptions);
public override System.ComponentModel.License GetLicense(System.ComponentModel.LicenseContext context, Type type, object instance, bool allowExceptions);
override this.GetLicense : System.ComponentModel.LicenseContext * Type * obj * bool -> System.ComponentModel.License
Public Overrides Function GetLicense (context As LicenseContext, type As Type, instance As Object, allowExceptions As Boolean) As License
매개 변수
- context
- LicenseContext
LicenseContext 사용이 허가된 개체를 사용할 수 있는 위치를 지정하는 A입니다.
- allowExceptions
- Boolean
반품
유효한 입니다 License. 이 메서드가 유효한 매개 변수 또는 유효한 Licensecontext 매개 변수를 찾을 수 없으면 반환됩니다 null.
설명
디자인 타임에 메서드는 GetLicense 만들 구성 요소의 위치 myClassName.LICmyClassName 인 명명된 FullName라이선스 파일을 찾습니다. 이 파일은 구성 요소가 포함된 .dll 파일과 동일한 디렉터리에 있어야 합니다.
다음으로, 이 메서드는 메서드에 지정된 IsKeyValid 키에 대해 라이선스 파일의 첫 번째 줄을 확인합니다. 키가 유효한 경우 이 줄은 .로 LicenseKey사용됩니다.