public void TestComplexDllImport() { NameEntityType allType = NameEntityType.OrganizationName | NameEntityType.PersonName | NameEntityType.PlaceName; UseComplexDllByStatic nameFinder = new UseComplexDllByStatic(allType); //param is not didn't use bool isInit = nameFinder.Initialize(@".\data"); if (isInit) { List <NameEntity> nameResults = new List <NameEntity>(); //param text is not didn't use string text = ""; bool isSuccess = nameFinder.CreateNameEntitys(text, ref nameResults); Assert.AreEqual(isSuccess, true); } }
public UseComplexDllByStatic() { NameEntityType allType = NameEntityType.OrganizationName | NameEntityType.PersonName | NameEntityType.PlaceName; _handle = CreateNameFinderInstance(allType); }
public UseComplexDllByStatic(NameEntityType type) { _handle = CreateNameFinderInstance(type); }
private extern static NameFinderSafeHandle CreateNameFinderInstance(NameEntityType type);
private static extern NameFinderSafeHandle CreateNameFinderInstance(NameEntityType type);
public NameFinderWrapper(NameEntityType type) { _handle = CreateNameFinderInstance(type); }