当前位置: 首页>>代码示例>>C#>>正文


C# IDataContainer类代码示例

本文整理汇总了C#中IDataContainer的典型用法代码示例。如果您正苦于以下问题:C# IDataContainer类的具体用法?C# IDataContainer怎么用?C# IDataContainer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IDataContainer类属于命名空间,在下文中一共展示了IDataContainer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PreProcess

        public override IDataContainer PreProcess(IDataContainer dataContainer)
        {
            if (dataContainer.OfType<BlobData>().Any())
            {
                if (StagedData.OfType<BlobData>().Any())
                    Push();

                foreach (var data in dataContainer)
                    Stage(data);
            }
            else if (dataContainer.OfType<Marker>().Any())
            {
                if (StagedData.OfType<Marker>().Any())
                    Push();

                foreach (var data in dataContainer)
                    Stage(data);
            }
            else if (dataContainer.OfType<Hand>().Any())
            {
                if (StagedData.OfType<Hand>().Any())
                    Push();

                foreach (var data in dataContainer)
                    Stage(data);
            }

            return null;
        }
开发者ID:AlternateIf,项目名称:huddle-engine,代码行数:29,代码来源:UnsyncFusion.cs

示例2: TemplateData

 /// <summary>
 /// Creates a new instance of a TemplateData object that will be used to generate code from a template
 /// </summary>
 /// <param name="DataContainer">A table or view</param>
 /// <param name="UserName">The user who will be named as the author in the genrated code files</param>
 /// <param name="RootNamespace">The root namespace to apply to the generated classes</param>
 /// <param name="DatabaseName">The name of the database</param>
 public TemplateData(IDataContainer DataContainer, string UserName, string RootNamespace, string DatabaseName)
 {
     _databaseName = DatabaseName;
     _dataContainer = DataContainer;
     _userName = UserName;
     _rootNamespace = RootNamespace;
 }
开发者ID:nathantownsend,项目名称:DALAPI,代码行数:14,代码来源:TemplateData.cs

示例3: GetTypeMatcherProperyReader

 internal static TypeMatcherProperyReader GetTypeMatcherProperyReader(object obj, string objParam, string component, string param, IDataContainer owner)
 {
     TypeMatcherWatcher watcher = TypeMatcherWatcher.GetTypeMatcherWatcher(obj, objParam, owner);
     Func<TypeMatcherProperyReader> create =
         new Func<TypeMatcherProperyReader>(() => new TypeMatcherProperyReader(watcher, component, param));
     string fullParam = component + "." + param;
     return DoubleDictionary<TypeMatcherWatcher, string, TypeMatcherProperyReader>.GetItem(watcher, fullParam, create);
 }
开发者ID:kinectitude,项目名称:kinectitude,代码行数:8,代码来源:TypeMatcherProperyReader.cs

示例4: PreProcess

 public override IDataContainer PreProcess(IDataContainer dataContainer)
 {
     if (dataContainer.FrameId % 10 == 0)
     {
         return dataContainer;
     }
     return null;
 }
开发者ID:AlternateIf,项目名称:huddle-engine,代码行数:8,代码来源:Sampler.cs

示例5: SeasonsList

        public SeasonsList( IViewModelContainer viewModelContainer, IDataContainer dataContainer, ISeriesList seriesList )
            : base(viewModelContainer, dataContainer)
        {
            MessengerInstance.Register<SelectedSeriesChanged>( this, OnSelectedSeriesChanged );
            Seasons = new ObservableCollection<SeasonEntry>();

            OnSelectedSeriesChanged( new SelectedSeriesChanged( seriesList.SelectedSeries ) );
        }
开发者ID:TheSylence,项目名称:DeVi,代码行数:8,代码来源:SeasonsList.cs

示例6: TypeMatcherWatcher

 private TypeMatcherWatcher(object obj, string param, IDataContainer owner)
 {
     Obj = obj;
     Param = param;
     Type objType = obj.GetType();
     Owner = owner;
     if(typeof(IChangeable).IsAssignableFrom(obj.GetType()))
         Owner.NotifyOfComponentChange(new Tuple<IChangeable,string>((IChangeable)obj, param), this);
 }
开发者ID:kinectitude,项目名称:kinectitude,代码行数:9,代码来源:TypeMatcherWatcher.cs

示例7: SettingsDialogViewModel

		public SettingsDialogViewModel( IViewModelContainer viewModelContainer, IDataContainer dataContainer, IAppThemes themes ) : base( viewModelContainer, dataContainer )
		{
			Themes = themes ?? new AppThemes();
			AvailableAccents = Themes.Accents.ToList();
			AvailableThemes = Themes.Themes.ToList();

			AvailableLanguages = new List<CultureInfo>( ViewModelContainer.LanguageProvider.AvailableLanguages.OrderBy( l => l.NativeName ) );
			AvailableContentLanguages = Repositories.Languages.GetAll().Select( l => l.Culture ).OrderBy( l => l.NativeName ).ToList();
		}
开发者ID:TheSylence,项目名称:DeVi,代码行数:9,代码来源:SettingsDialogViewModel.cs

示例8: EpisodesList

        public EpisodesList( IViewModelContainer container, IDataContainer dataContainer, ISeriesList seriesList, ISeasonsList seasonsList )
            : base(container, dataContainer)
        {
            SeriesList = seriesList;

            Episodes = new ObservableCollection<EpisodeEntry>();
            MessengerInstance.Register<SelectedSeasonChanged>( this, OnSelectedSeasonChanged );

            OnSelectedSeasonChanged( new SelectedSeasonChanged( seasonsList?.SelectedSeason?.SeasonNumber ) );
        }
开发者ID:TheSylence,项目名称:DeVi,代码行数:10,代码来源:EpisodesList.cs

示例9: EpisodeDetails

        public EpisodeDetails( IViewModelContainer viewModelContainer, IDataContainer dataContainer, IEpisodesList episodesList )
            : base(viewModelContainer, dataContainer)
        {
            MessengerInstance.Register<SelectedEpisodeChanged>( this, OnSelectedEpisodeChanged );

            Writers = new ObservableCollection<PersonEntry>();
            Directors = new ObservableCollection<PersonEntry>();
            GuestStars = new ObservableCollection<PersonEntry>();

            OnSelectedEpisodeChanged( new SelectedEpisodeChanged( episodesList.SelectedEpisode ) );
        }
开发者ID:TheSylence,项目名称:DeVi,代码行数:11,代码来源:EpisodeDetails.cs

示例10: EpisodeEntry

		public EpisodeEntry( IViewModelContainer viewModelContainer, IDataContainer dataContainer, Episode model, SeriesEntry series )
			: base( viewModelContainer, dataContainer )
		{
			Series = series;
			Model = model;

			if( model.BannerLocation != null )
			{
				BannerUrl = model.BannerLocation;
			}
		}
开发者ID:TheSylence,项目名称:DeVi,代码行数:11,代码来源:EpisodeEntry.cs

示例11: CreateValueReader

        public ValueReader CreateValueReader(string value, IScene scene, IDataContainer entity, Event evt = null)
        {
            ParseTree tree = parser.Parse(value);   // Should always be valid since UI calls HasErrors first
            var assignable = MakeAssignable(tree.Root, scene, entity, evt);

            var reader = assignable as ValueReader;
            if (null == reader)
            {
                var typeMatcher = assignable as TypeMatcher;
                if (null != typeMatcher)
                {
                    reader = ConstantReader.NullValue;
                }
            }

            return reader;
        }
开发者ID:kinectitude,项目名称:kinectitude,代码行数:17,代码来源:KGLValueMaker.cs

示例12: PreProcess

        public override IDataContainer PreProcess(IDataContainer dataContainer)
        {
            var push = false;
            Parallel.ForEach(StagedData, staged =>
            {
                if (dataContainer.Any(d => d.Source.Equals(staged.Source)))
                push = true;
            });

            if (push)
                Push();

            //foreach (var data in dataContainer.OfType<BlobData>())
            //    Stage(data);

            Stage(dataContainer.ToArray());

            return null;
        }
开发者ID:AlternateIf,项目名称:huddle-engine,代码行数:19,代码来源:SyncFusion.cs

示例13: SeriesEntry

		public SeriesEntry( IViewModelContainer viewModelContainer, IDataContainer dataContainer, Series model )
			: base( viewModelContainer, dataContainer )
		{
			Model = model;

			var allEpisodes = Model.Episodes.Where( e => e.SeasonNumber != 0 ).ToArray();

			Episodes = new ObservableCollection<EpisodeEntry>( allEpisodes.Select( e => new EpisodeEntry( viewModelContainer, dataContainer, e, this ) ) );
			Seasons =
				new ObservableCollection<SeasonEntry>( allEpisodes.Select( e => e.SeasonNumber ).Distinct().Select( n => new SeasonEntry( viewModelContainer, dataContainer, n, this ) ) );

			Name = model.Name;
			Rating = model.Rating;
			RatingsCount = model.Ratings;

			if( model.BannerLocation != null )
			{
				BannerUrl = model.BannerLocation;
			}
		}
开发者ID:TheSylence,项目名称:DeVi,代码行数:20,代码来源:SeriesEntry.cs

示例14: PreProcess

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataContainer"></param>
        /// <returns></returns>
        public override IDataContainer PreProcess(IDataContainer dataContainer)
        {
            var rgbImages = dataContainer.OfType<RgbImageData>().ToArray();
            if (rgbImages.Any())
            {
                if (_rgbImageData != null)
                    _rgbImageData.Dispose();

                _rgbImageData = rgbImages.First().Copy() as RgbImageData;
                return null;
            }

            if (_rgbImageData != null)
            {
                dataContainer.Add(_rgbImageData.Copy());
                _rgbImageData.Dispose();
                _rgbImageData = null;
            }

            return dataContainer;
        }
开发者ID:AlternateIf,项目名称:huddle-engine,代码行数:26,代码来源:MergeRgbImageAndDevice.cs

示例15: PreProcess

        public override IDataContainer PreProcess(IDataContainer dataContainer)
        {
            const int width = 1280;
            const int height = 720;
            var image = new Image<Rgb, byte>(width, height);

            foreach (var blob in dataContainer.OfType<BlobData>())
            {
                var polyline = new List<Point>();
                foreach (var point in blob.Polygon.Points)
                {
                    var x = point.X * width;
                    var y = point.Y * height;

                    polyline.Add(new Point((int)x, (int)y));
                }

                var color = Rgbs.White;
                if (typeof(RectangleTracker) == blob.Source.GetType())
                    color = Rgbs.Red;
                else if (typeof(RectangleTrackerColor) == blob.Source.GetType())
                    color = Rgbs.Yellow;

                var centerX = (int)(blob.Center.X * width);
                var centerY = (int)(blob.Center.Y * height);

                image.DrawPolyline(polyline.ToArray(), true, color, 5);
                image.Draw(string.Format("Id {0}", blob.Id), ref EmguFontBig, new Point(centerX, centerY), Rgbs.White);
            }

            Stage(new RgbImageData(this, "BlobRenderer", image.Copy()));
            Push();

            image.Dispose();

            return null;
        }
开发者ID:AlternateIf,项目名称:huddle-engine,代码行数:37,代码来源:BlobRenderer.cs


注:本文中的IDataContainer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。