• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDataContainer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: innermedia_GetListItemUrl

    private string innermedia_GetListItemUrl(IDataContainer data, bool isPreview, bool notAttachment)
    {
        // Get set of important information
        string arg = GetArgumentSet(data);

        // Get URL of the list item image
        return GetItemUrl(arg, 0, 0, 0, notAttachment);
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:8,代码来源:MediaView.ascx.cs


示例17: innermedia_GetArgumentSet

 /// <summary>
 /// Returns argument set according passed DataRow and flag indicating whether the set is obtained for selected item.
 /// </summary>
 /// <param name="data">DataRow with all the item data</param>
 /// <param name="isSelected">Indicates whether the set is required for an selected item</param>
 private string innermedia_GetArgumentSet(IDataContainer data)
 {
     // Return required argument set
     return GetArgumentSet(data);
 }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:10,代码来源:MediaView.ascx.cs


示例18: GetArgumentSet

    /// <summary>
    /// Returns argument set for the passed file data row.
    /// </summary>
    /// <param name="data">Data row object holding all the data on current file</param>
    public string GetArgumentSet(IDataContainer data)
    {
        string className = ValidationHelper.GetString(data.GetValue("ClassName"), String.Empty).ToLowerCSafe();
        string name = string.Empty;

        // Get file name with extension
        switch (SourceType)
        {
            case MediaSourceEnum.DocumentAttachments:
                name = AttachmentHelper.GetFullFileName(Path.GetFileNameWithoutExtension(data.GetValue("AttachmentName").ToString()), data.GetValue("AttachmentExtension").ToString());
                break;
            case MediaSourceEnum.MetaFile:
                name = MetaFileInfoProvider.GetFullFileName(Path.GetFileNameWithoutExtension(data.GetValue("MetaFileName").ToString()), data.GetValue("MetaFileExtension").ToString());
                break;
            default:
                name = data.GetValue("DocumentName").ToString();
                break;
        }

        StringBuilder sb = new StringBuilder();

        // Common information for both content & attachments
        sb.Append("name|" + CMSDialogHelper.EscapeArgument(name));

        // Load attachment info only for CMS.File document type
        if (((SourceType != MediaSourceEnum.Content) && (SourceType != MediaSourceEnum.MetaFile)) || (className == "cms.file"))
        {
            sb.Append("|AttachmentExtension|" + CMSDialogHelper.EscapeArgument(data.GetValue("AttachmentExtension")));
            sb.Append("|AttachmentImageWidth|" + CMSDialogHelper.EscapeArgument(data.GetValue("AttachmentImageWidth")));
            sb.Append("|AttachmentImageHeight|" + CMSDialogHelper.EscapeArgument(data.GetValue("AttachmentImageHeight")));
            sb.Append("|AttachmentSize|" + CMSDialogHelper.EscapeArgument(data.GetValue("AttachmentSize")));
            sb.Append("|AttachmentGUID|" + CMSDialogHelper.EscapeArgument(data.GetValue("AttachmentGUID")));
        }
        else if (SourceType == MediaSourceEnum.MetaFile)
        {
            sb.Append("|MetaFileExtension|" + CMSDialogHelper.EscapeArgument(data.GetValue("MetaFileExtension")));
            sb.Append("|MetaFileImageWidth|" + CMSDialogHelper.EscapeArgument(data.GetValue("MetaFileImageWidth")));
            sb.Append("|MetaFileImageHeight|" + CMSDialogHelper.EscapeArgument(data.GetValue("MetaFileImageHeight")));
            sb.Append("|MetaFileSize|" + CMSDialogHelper.EscapeArgument(data.GetValue("MetaFileSize")));
            sb.Append("|MetaFileGUID|" + CMSDialogHelper.EscapeArgument(data.GetValue("MetaFileGUID")));
            sb.Append("|SiteID|" + CMSDialogHelper.EscapeArgument(data.GetValue("MetaFileSiteID")));
        }
        else
        {
            sb.Append("|AttachmentExtension||AttachmentImageWidth||AttachmentImageHeight||AttachmentSize||AttachmentGUID|");
        }

        // Get source type specific information
        if (SourceType == MediaSourceEnum.Content)
        {
            sb.Append("|NodeSiteID|" + CMSDialogHelper.EscapeArgument(data.GetValue("NodeSiteID")));
            sb.Append("|SiteName|" + CMSDialogHelper.EscapeArgument(data.GetValue("SiteName")));
            sb.Append("|NodeGUID|" + CMSDialogHelper.EscapeArgument(data.GetValue("NodeGUID")));
            sb.Append("|NodeID|" + CMSDialogHelper.EscapeArgument(data.GetValue("NodeID")));
            sb.Append("|NodeAlias|" + CMSDialogHelper.EscapeArgument(data.GetValue("NodeAlias")));
            sb.Append("|NodeAliasPath|" + CMSDialogHelper.EscapeArgument(data.GetValue("NodeAliasPath")));
            sb.Append("|DocumentUrlPath|" + CMSDialogHelper.EscapeArgument(data.GetValue("DocumentUrlPath")));
            sb.Append("|DocumentExtensions|" + CMSDialogHelper.EscapeArgument(data.GetValue("DocumentExtensions")));
            sb.Append("|ClassName|" + CMSDialogHelper.EscapeArgument(data.GetValue("ClassName")));
            sb.Append("|NodeLinkedNodeID|" + CMSDialogHelper.EscapeArgument(data.GetValue("NodeLinkedNodeID")));
        }
        else if (SourceType != MediaSourceEnum.MetaFile)
        {
            string formGuid = data.ContainsColumn("AttachmentFormGUID") ? data.GetValue("AttachmentFormGUID").ToString() : Guid.Empty.ToString();
            string siteId = data.ContainsColumn("AttachmentSiteID") ? data.GetValue("AttachmentSiteID").ToString() : "0";

            sb.Append("|SiteID|" + CMSDialogHelper.EscapeArgument(siteId));
            sb.Append("|FormGUID|" + CMSDialogHelper.EscapeArgument(formGuid));
            sb.Append("|AttachmentDocumentID|" + CMSDialogHelper.EscapeArgument(data.GetValue("AttachmentDocumentID")));
        }

        return sb.ToString();
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:77,代码来源:MediaView.ascx.cs


示例19: StatisticsDialogViewModel

 public StatisticsDialogViewModel( IViewModelContainer viewModelContainer, IDataContainer dataContainer )
     : base(viewModelContainer, dataContainer)
 {
 }
开发者ID:TheSylence,项目名称:DeVi,代码行数:4,代码来源:StatisticsDialogViewModel.cs


示例20: innermedia_GetTilesThumbsItemUrl

    private string innermedia_GetTilesThumbsItemUrl(IDataContainer data, bool isPreview, int height, int width, int maxSideSize, bool notAttachment)
    {
        string url = string.Empty;

        string ext = (SourceType != MediaSourceEnum.MetaFile) ? data.GetValue("AttachmentExtension").ToString() : data.GetValue("MetaFileExtension").ToString();
        string arg = GetArgumentSet(data);

        // If image is requested for preview
        if (isPreview)
        {
            if (!ImageHelper.IsImage(ext) || notAttachment)
            {
                string className = (SourceType == MediaSourceEnum.Content) ? data.GetValue("ClassName").ToString().ToLowerCSafe() : "";
                if (className == "cms.file")
                {
                    // File isn't image and no preview exists - get default file icon
                    url = GetFileIconUrl(ext, string.Empty);
                }
                else if (((SourceType == MediaSourceEnum.DocumentAttachments) || (SourceType == MediaSourceEnum.Attachment) || (SourceType == MediaSourceEnum.MetaFile)) && !String.IsNullOrEmpty(ext))
                {
                    // Get file icon for attachment
                    url = GetFileIconUrl(ext, string.Empty);
                }
                else
                {
                    url = GetDocumentTypeIconUrl(className, "48x48");
                }
            }
            else
            {
                // Try to get preview or image itself
                url = GetItemUrl(arg, height, width, maxSideSize, notAttachment);
            }
        }
        else
        {
            url = GetItemUrl(arg, 0, 0, 0, notAttachment);
        }

        return url;
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:41,代码来源:MediaView.ascx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDataContext类代码示例发布时间:2022-05-24
下一篇:
C# IDataConnector类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap