예제 #1
0
 private DirectoryResource[] GetEquipmentByClassificationExpression(Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression classificationExpression, string equipmentName)
 {
     return(this.ServiceDirectoryManager.IDirectorySearch.Search2(
                StandardBranches.GetBranchAddresses(this.ServiceDirectoryManager.ILocalDirectory, StandardBranches.EquipmentHintPath).Select(address => new DirectoryResource(address)).ToArray(),
                classificationExpression,
                new Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression(),
                false,
                equipmentName,
                "",
                true,
                1
                ).Results);
 }
예제 #2
0
        internal DirectoryResource[] GetEquipmentClasses(string _Expression)
        {
            try
            {
                // this.ServiceDirectoryManager.IDirectorySearch _search = (this.ServiceDirectoryManager.IDirectorySearch)UC.GetDefaultProvider("NAVIGATION_IDIRECTORYSEARCH");

                DirectoryResource _root = new DirectoryResource("CN=Equipment,CN=SOAProject,CN=Projects,OU=Publications,O=Proficy");

                Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression IncludedClassifications = new Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression(_Expression);
                Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression ExcludedClassifications = new Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression(null, "");

                DirectoryResource[] _EquipmentClasses = this.ServiceDirectoryManager.IDirectorySearch.Search(
                    _root, IncludedClassifications, ExcludedClassifications, null, null);

                return(_EquipmentClasses);
            }
            catch (System.Exception ex)
            {
                throw;
            }
        }