Пример #1
0
        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);
            }
        }
Пример #2
0
        public UseComplexDllByStatic()
        {
            NameEntityType allType = NameEntityType.OrganizationName | NameEntityType.PersonName | NameEntityType.PlaceName;

            _handle = CreateNameFinderInstance(allType);
        }
Пример #3
0
 public UseComplexDllByStatic(NameEntityType type)
 {
     _handle = CreateNameFinderInstance(type);
 }
Пример #4
0
 private extern static NameFinderSafeHandle CreateNameFinderInstance(NameEntityType type);
 private static extern NameFinderSafeHandle CreateNameFinderInstance(NameEntityType type);
 public NameFinderWrapper(NameEntityType type)
 {
     _handle = CreateNameFinderInstance(type);
 }