Exemple #1
0
        public LightSpeedInstallerRepository(DataProvider dataProvider, SchemaBase schema, string connectionString)
        {
            DataProvider     = dataProvider;
            Schema           = schema;
            ConnectionString = connectionString;

            _context = CreateLightSpeedContext(dataProvider, connectionString);
        }
Exemple #2
0
		public override async Task<IEnumerable<HtmlSchema>> GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new LocalStorageDataConfig
            {
                FilePath = "/Assets/Data/ORGANIGRAMME.htm"
            };
            return await _dataProvider.LoadDataAsync(config, MaxRecords);
        }
        public override async Task <IEnumerable <FacebookSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new FacebookDataConfig
            {
                UserId = "222343777914236"
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <Concerts1Schema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new LocalStorageDataConfig
            {
                FilePath = "/Assets/Data/Concerts.json",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
 public DataStoreType(string name, string description, DataProvider lightSpeedDbType, SchemaBase schema)
 {
     Name        = name;
     Description = description;
     RequiresCustomRepository = false;
     CustomRepositoryType     = "";
     LightSpeedDbType         = lightSpeedDbType;
     Schema = schema;
 }
Exemple #6
0
        public override async Task <IEnumerable <HtmlSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new LocalStorageDataConfig
            {
                FilePath = "/Assets/Data/CLASSESHORAIRESAMENAGES.htm"
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #7
0
        public override async Task <IEnumerable <RssSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new RssDataConfig
            {
                Url = new Uri("http://myslo.ru/rss/lenta"),
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #8
0
 protected SchemaExtension(SchemaBase schema, JsonSerializerSettings settings = null)
 {
     _schema  = schema;
     settings = settings ?? new JsonSerializerSettings
     {
         Converters = new JsonConverter[] { new StringEnumConverter() }
     };
     _serializer = JsonSerializer.Create(settings);
 }
Exemple #9
0
        public override async Task <IEnumerable <RssSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new RssDataConfig
            {
                Url = new Uri("https://www.iamydp.cn/feed/"),
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <HtmlSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new LocalStorageDataConfig
            {
                FilePath = "/Assets/Data/AnglaisEtSectionEuropeenne.htm"
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #11
0
        public override async Task <IEnumerable <RssSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new RssDataConfig
            {
                Url = new Uri("https://github.com/ginkogrudev/Card-Game-Test/commits/master.atom"),
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        /// <summary>
        /// This method scans an assembly for BizTalk Schemas and adds them to the supplied Schema List
        /// </summary>
        /// <param name="assemblyPath"></param>
        /// <param name="schemaList"></param>
        public static void GetSchemasFromAssembly(string assemblyPath, List <SchemaItem> schemaList)
        {
            const string METHOD_NAME = "GetSchemasFromAssembly";

            Logging.LogMessage(CLASS_NAME, METHOD_NAME, "Begin");

            if (string.IsNullOrEmpty(assemblyPath))
            {
                return;
            }

            try
            {
                // Load the assembly from the path specified
                Assembly schemaAssembly = Assembly.LoadFrom(assemblyPath);

                // See if it is a BizTalk Assembly
                if (IsBizTalkAssembly(schemaAssembly))
                {
                    // It is a BizTalk Assembly, is it a Schema assembly?
                    foreach (Type type in schemaAssembly.GetTypes())
                    {
                        // Check if the current assembly is of a Schema type and not a property schema
                        if (IsBizTalkSchemaType(type) && !IsBizTalkPropertySchema(type))
                        {
                            // Valid Schema found. Find out if it contains a multi rooted schema
                            object[] assemblyAttributes = type.GetCustomAttributes(typeof(SchemaRootsAttribute), false);
                            if (assemblyAttributes != null && assemblyAttributes.Length > 0)
                            {
                                // Schema found, add the rootnode of the schema
                                SchemaBase sba = Activator.CreateInstance(type) as SchemaBase;

                                // Iterate over the root nodes and add them to the list
                                foreach (string rootNode in sba.RootNodes)
                                {
                                    Logging.LogMessage(CLASS_NAME, METHOD_NAME, string.Format("Schema '{0}' found with rootnode '{1}', add it to the list", type.FullName, rootNode));

                                    // Create a new SchemaItem object, the name is including the rootnode
                                    // The path can be empty, it is not relevant for schema assemblies
                                    SchemaItem newSchema = new SchemaItem(type.Namespace, type.Name, rootNode, null);

                                    // Add the found Schema to the list of Schemas
                                    AddSchemaToList(schemaList, newSchema);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Logging.LogMessage(CLASS_NAME, METHOD_NAME, ex.Message);
            }

            Logging.LogMessage(CLASS_NAME, METHOD_NAME, "End");
        }
Exemple #13
0
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Playlist,
                Query     = @"PLNDEdDyEUuMqYVZ73GEd-6dsjvgQFyOBe",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Videos,
                Query     = @"UCU9L-bCLXEW3tBdeKgqM4nQ/videos",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <FlickrSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new FlickrDataConfig
            {
                QueryType = FlickrQueryType.Id,
                Query     = @"145038218@N02",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Playlist,
                Query     = @"PLnHaBymr53cbbkddkjrBLaRaJgdd7e1eO",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Videos,
                Query     = @"UCoo875FS1OUFcvXDkUgJKhg/videos",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #18
0
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Videos,
                Query     = @"UC_7tE8ya2caKRAdAO1M7H6w/videos",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #19
0
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Videos,
                Query     = @"channel/UC1vjbXkIvjEkL9sW1lTk31Q/videos",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #20
0
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Playlist,
                Query     = @"PLFI3QY0RfMcjh2brKwwiEdM7hhlFpOoqg",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Playlist,
                Query     = @"PL0D0919552167FDA0",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Videos,
                Query     = @"UCAyQ1mYchR0NPIco10lWHiw",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Playlist,
                Query     = @"PLc9NGm66XDpYirHnpR4Wvj9MvBcwKGnt_",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #24
0
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Playlist,
                Query     = @"PLGLfVvz_LVvSX7fVd4OUFp_ODd86H0ZIY",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #25
0
        public override async Task <IEnumerable <BingSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new BingDataConfig
            {
                Country = BingCountry.France,
                Query   = @"college rodin"
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Playlist,
                Query     = @"PL6jk7-ujY14QdUy5fZYlfuFOPSdZUMRY1",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Channels,
                Query     = @"teletula71",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #28
0
        public override async Task <IEnumerable <YouTubeSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new YouTubeDataConfig
            {
                QueryType = YouTubeQueryType.Playlist,
                Query     = @"PLIPLqGm8fkLrUeprU2QH0M0D4H-3bbNi4",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #29
0
        public override async Task <IEnumerable <TwitterSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new TwitterDataConfig
            {
                QueryType = TwitterQueryType.Search,
                Query     = @"#rodin"
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #30
0
        public override async Task <IEnumerable <WordPressSchema> > GetDataAsync(SchemaBase connectedItem = null)
        {
            var config = new WordPressDataConfig
            {
                QueryType = WordPressQueryType.Posts,
                Query     = @"jamianadwiyyacollageevents.wordpress.com",
                FilterBy  = @"",
            };

            return(await _dataProvider.LoadDataAsync(config, MaxRecords));
        }
Exemple #31
0
        protected Guid? ConvertToGuidByHierarchicalPath(DataRow dr, string columnName, bool isRequired, char delimiter, SchemaBase mainTable)
        {
            object obj = dr[map[columnName]];

            if (isRequired && (obj == null || obj == DBNull.Value))
                throw new Exception("'" + map[columnName] + "' is required and cannot be left empty.");
            if (obj == null || obj == DBNull.Value)
                return null;

            string[] values = obj.ToString().Split(delimiter);

            ExpressionCondition cond = Query.True;
            SchemaBase currentTable = mainTable;
            for (int i = values.Length - 1; i >= 0; i--)
            {
                cond = cond & currentTable.ObjectName == values[i].Trim();
                currentTable = currentTable.ParentSchemaBase;
            }

            ArrayList list = ConvertIEnumerableToArrayList(mainTable.LoadObjects(cond));
            if (list.Count == 0)
                throw new Exception("Unable to find a record in the table '" + mainTable.SchemaInfo.tableName + "' where the path corresponds to '" + obj.ToString() + "'.");
            if (list.Count > 1)
                throw new Exception("Found multiple records in the table '" + mainTable.SchemaInfo.tableName + "' where the path corresponds to '" + obj.ToString() + "'.");
            return ((PersistentObject)list[0]).ObjectID;
        }
Exemple #32
0
        protected Guid? ConvertToGuidByObjectName(DataRow dr, string columnName, bool isRequired, SchemaBase mainTable)
        {
            object obj = dr[map[columnName]];

            if (isRequired && (obj == null || obj == DBNull.Value))
                throw new Exception("'" + map[columnName] + "' is required and cannot be left empty.");
            if (obj == null || obj == DBNull.Value)
                return null;

            string value = obj.ToString().Trim();

            ArrayList list = ConvertIEnumerableToArrayList(mainTable.LoadObjects(mainTable.ObjectName == value));
            if (list.Count == 0)
                throw new Exception("Unable to find a record in the table '" + mainTable.SchemaInfo.tableName + "' where the ObjectName = '" + value + "'.");
            if (list.Count > 1)
                throw new Exception("Found multiple records in the table '" + mainTable.SchemaInfo.tableName + "' where the ObjectName = '" + value + "'.");
            return ((PersistentObject)list[0]).ObjectID;
        }