Exemplo n.º 1
0
        public static void ClassInit(XElement xe)
        {
            //__useUrlCache = xe.zXPathValueBool("UseUrlCache", false);
            __useUrlCache    = xe.zXPathValue("UseUrlCache").zTryParseAs(false);
            __cacheDirectory = xe.zXPathValue("CacheDirectory");

            //__useXml = xe.zXPathValueBool("UseXml", __useXml);
            //__xmlNodeName = xe.zXPathValue("XmlNodeName");
            //__useMongo = xe.zXPathValueBool("UseMongo", __useMongo);
            __useMongo              = xe.zXPathValue("UseMongo").zTryParseAs(__useMongo);
            __mongoServer           = xe.zXPathValue("MongoServer", __mongoServer);
            __mongoDatabase         = xe.zXPathValue("MongoDatabase");
            __mongoCollectionName   = xe.zXPathValue("MongoCollection");
            __mongoDocumentItemName = xe.zXPathValue("MongoDocumentItemName");

            IDocumentStore_v1 <ZoneEbooks_HeaderPage> documentStore = null;

            if (__useMongo)
            {
                documentStore = new MongoDocumentStore_v1 <ZoneEbooks_HeaderPage>(__mongoServer, __mongoDatabase, __mongoCollectionName, __mongoDocumentItemName);
                ZoneEbooks.InitMongoClassMap();
            }

            _load = new pb.Web.v1.LoadWebData_v2 <ZoneEbooks_HeaderPage>(new pb.Web.v1.LoadDataFromWeb_v2 <ZoneEbooks_HeaderPage>(LoadHeaderPageFromWeb, GetUrlCache()), documentStore);

            InitImagesToSkip();
        }
Exemplo n.º 2
0
        public static void ClassInit(XElement xe)
        {
            __useUrlCache    = xe.zXPathValue("UseUrlCache").zTryParseAs(false);
            __cacheDirectory = xe.zXPathValue("CacheDirectory");

            __useXml                = xe.zXPathValue("UseXml").zTryParseAs(__useXml);
            __xmlNodeName           = xe.zXPathValue("XmlNodeName");
            __useMongo              = xe.zXPathValue("UseMongo").zTryParseAs(__useMongo);
            __mongoServer           = xe.zXPathValue("MongoServer", __mongoServer);
            __mongoDatabase         = xe.zXPathValue("MongoDatabase");
            __mongoCollectionName   = xe.zXPathValue("MongoCollection");
            __mongoDocumentItemName = xe.zXPathValue("MongoDocumentItemName");

            IDocumentStore_v1 <TelechargementPlus_PostDetail> documentStore = null;

            if (__useMongo)
            {
                //documentStore = new MongoDocumentStoreInSpecificItem<TelechargementPlus_PostDetail>(__mongoServer, __mongoDatabase, __mongoCollectionName, __mongoDocumentItemName);
                documentStore = new MongoDocumentStore_v1 <TelechargementPlus_PostDetail>(__mongoServer, __mongoDatabase, __mongoCollectionName, __mongoDocumentItemName);
                TelechargementPlus.InitMongoClassMap();
            }
            _load = new pb.Web.v1.LoadWebData_v2 <TelechargementPlus_PostDetail>(new pb.Web.v1.LoadDataFromWeb_v2 <TelechargementPlus_PostDetail>(LoadPostDetailFromWeb, GetUrlCache()), documentStore);
            //_load.SetXmlParameters(__useXml, __xmlNodeName);
            //_load.SetMongoParameters(__useMongo, __mongoServer, __mongoDatabase, __mongoCollectionName);
        }
Exemplo n.º 3
0
        public static void ClassInit(XElement xe)
        {
            __useUrlCache = xe.zXPathValue("UseUrlCache").zTryParseAs(false);
            __cacheDirectory = xe.zXPathValue("CacheDirectory");

            __useXml = xe.zXPathValue("UseXml").zTryParseAs(__useXml);
            __xmlNodeName = xe.zXPathValue("XmlNodeName");
            __useMongo = xe.zXPathValue("UseMongo").zTryParseAs(__useMongo);
            __mongoServer = xe.zXPathValue("MongoServer", __mongoServer);
            __mongoDatabase = xe.zXPathValue("MongoDatabase");
            __mongoCollectionName = xe.zXPathValue("MongoCollection");
            __mongoDocumentItemName = xe.zXPathValue("MongoDocumentItemName");

            IDocumentStore_v1<RapideDdl_PostDetail> documentStore = null;
            if (__useMongo)
            {
                documentStore = new MongoDocumentStore_v1<RapideDdl_PostDetail>(__mongoServer, __mongoDatabase, __mongoCollectionName, __mongoDocumentItemName);
                RapideDdl.InitMongoClassMap();
            }
            _load = new pb.Web.v1.LoadWebData_v2<RapideDdl_PostDetail>(new pb.Web.v1.LoadDataFromWeb_v2<RapideDdl_PostDetail>(LoadPostDetailFromWeb, GetUrlCache()), documentStore);
            //_load.SetXmlParameters(__useXml, __xmlNodeName);
        }