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); }
//private DirectoryResource departmentEquipmentClass; //private DirectoryResource DepartmentEquipmentClass { get { lock (this) return this.departmentEquipmentClass ?? (this.departmentEquipmentClass = this.GetEquipmentClass(EquipmentClasses.Department.Name)); } } //private DirectoryResource machineEquipmentClass; //public DirectoryResource MachineEquipmentClass { get { lock (this) return this.machineEquipmentClass ?? (this.machineEquipmentClass = this.GetEquipmentClass(EquipmentClasses.Machine.Name)); } } //private DirectoryResource subInventoryEquipmentClass; //private DirectoryResource SubInventoryEquipmentClass { get { lock (this) return this.subInventoryEquipmentClass ?? (this.subInventoryEquipmentClass = this.GetEquipmentClass(EquipmentClasses.SubInventory.Name)); } } //private DirectoryResource pfM_ProductionLineEquipmentClass; //private DirectoryResource PfM_ProductionLineEquipmentClass { get { lock (this) return this.pfM_ProductionLineEquipmentClass ?? (this.pfM_ProductionLineEquipmentClass = this.GetEquipmentClass(EquipmentClasses.PfM_ProductionLine.Name)); } } //private DirectoryResource pfM_WorkCenterEquipmentClass; //private DirectoryResource PfM_WorkCenterEquipmentClass { get { lock (this) return this.pfM_WorkCenterEquipmentClass ?? (this.pfM_WorkCenterEquipmentClass = this.GetEquipmentClass(EquipmentClasses.PfM_WorkCenter.Name)); } } //private DirectoryResource pfM_MachineEquipmentClass; //private DirectoryResource PfM_MachineEquipmentClass { get { lock (this) return this.pfM_MachineEquipmentClass ?? (this.pfM_MachineEquipmentClass = this.GetEquipmentClass(EquipmentClasses.PfM_Machine.Name)); } } //private DirectoryResource operationEquipmentRequirementClass; //private DirectoryResource OperationEquipmentRequirementClass { get { lock (this) return this.operationEquipmentRequirementClass ?? (this.operationEquipmentRequirementClass = this.GetEquipmentClass(EquipmentClasses.OperationEquipmentRequirement.Name)); } } internal DirectoryResource GetEquipmentClass(string className) { return(this.ServiceDirectoryManager.IDirectorySearch.Search2( StandardBranches.GetBranchAddresses(this.ServiceDirectoryManager.ILocalDirectory, StandardBranches.EquipmentClassesHintPath).Select(address => new DirectoryResource(address)).ToArray(), new Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression(), new Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression(), false, className, "", true, 1 ).Results.First()); }
public DirectoryResource GetMaterialDefinition(string definitionName) { return(this.ServiceDirectoryManager.IDirectorySearch.Search2( StandardBranches.GetBranchAddresses(this.ServiceDirectoryManager.ILocalDirectory, StandardBranches.MaterialHintPath).Select(address => new DirectoryResource(address)).ToArray(), new Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression(), new Proficy.Platform.Services.Navigation.Interfaces.ClassificationExpression(), false, definitionName, "", true, 1 ).Results.FirstOrDefault()); }