Ejemplo n.º 1
0
        public bool ModelExist(string modelName, string modelPublisher, string layer = "")
        {
            AxUtilContext       utilContext = new AxUtilContext();
            AxUtilConfiguration config      = new AxUtilConfiguration()
            {
                Server = dbServer, Database = dbName, ModelArgument = new ModelArgument(modelName, modelPublisher)
            };

            bool modelFound = false;

            AxUtil util = new AxUtil();
            IList <ModelManifest> list = util.List(utilContext, config);

            foreach (ModelManifest manifest in list)
            {
                if (manifest.Name == modelName && manifest.Publisher == modelPublisher && (string.IsNullOrEmpty(layer) || layer.ToLower() == manifest.Layer.ToString().ToLower()))
                {
                    modelFound = true;
                }
            }

            return(modelFound);
        }
Ejemplo n.º 2
0
        public bool ModelExists(string modelName, string modelPublisher)
        {
            AxUtilContext       utilContext = new AxUtilContext();
            AxUtilConfiguration config      = new AxUtilConfiguration();

            config.AOSConfiguration = AOSName;
            bool modelFound = false;

            AxUtil util = new AxUtil();

            config.ModelArgument = new ModelArgument(modelName, modelPublisher);

            IList <ModelManifest> list = util.List(utilContext, config);

            foreach (ModelManifest manifest in list)
            {
                if (manifest.Name == modelName && manifest.Publisher == modelPublisher)
                {
                    modelFound = true;
                }
            }

            return(modelFound);
        }