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

C# DataSpace类代码示例

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

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



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

示例1: DbDeleteCommandTree

        internal DbDeleteCommandTree(MetadataWorkspace metadata, DataSpace dataSpace, DbExpressionBinding target, DbExpression predicate)
            : base(metadata, dataSpace, target)
        {
            EntityUtil.CheckArgumentNull(predicate, "predicate");

            this._predicate = predicate;
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:7,代码来源:DbDeleteCommandTree.cs


示例2: GetMap

        /// <summary>
        /// Search for a Mapping metadata with the specified type key.
        /// </summary>
        /// <param name="identity">identity of the type</param>
        /// <param name="typeSpace">The dataspace that the type for which map needs to be returned belongs to</param>
        /// <param name="ignoreCase">true for case-insensitive lookup</param>
        /// <exception cref="ArgumentException"> Thrown if mapping space is not valid</exception>
        internal virtual Map GetMap(string identity, DataSpace typeSpace, bool ignoreCase)
        {
            Contract.Requires(identity != null);

            //will only be implemented by Mapping Item Collections
            throw Error.NotSupported();
        }
开发者ID:WangWilliam,项目名称:EntityFramework5,代码行数:14,代码来源:MappingItemCollection.cs


示例3: DbModificationCommandTree

        internal DbModificationCommandTree(MetadataWorkspace metadata, DataSpace dataSpace, DbExpressionBinding target)
            : base(metadata, dataSpace)
        {
            Contract.Requires(target != null);

            _target = target;
        }
开发者ID:WangWilliam,项目名称:EntityFramework5,代码行数:7,代码来源:DbModificationCommandTree.cs


示例4: GetSchemaXsd

        /// <summary>
        /// Returns the stream of the XSD corresponding to the frameworkVersion, and dataSpace passed in.
        /// </summary>
        /// <param name="entityFrameworkVersion">The version of the EntityFramework that you want the Schema XSD for.</param>
        /// <param name="dataSpace">The data space of the schem XSD that you want.</param>
        /// <returns>Stream version of the XSD</returns>
        public static Stream GetSchemaXsd(Version entityFrameworkVersion, DataSpace dataSpace)
        {
            EDesignUtil.CheckTargetEntityFrameworkVersionArgument(entityFrameworkVersion, "entityFrameworkVersion");

            string resourceName = null;
            switch(dataSpace)
            {
                case DataSpace.CSpace:
                    resourceName =  GetEdmSchemaXsdResourceName(entityFrameworkVersion);
                    break;
                case DataSpace.CSSpace:
                    resourceName =  GetMappingSchemaXsdResourceName(entityFrameworkVersion);
                    break;
                case DataSpace.SSpace:
                    resourceName =  GetStoreSchemaXsdResourceName(entityFrameworkVersion);
                    break;
                default:
                    throw EDesignUtil.Argument("dataSpace");
            }

            Debug.Assert(!string.IsNullOrEmpty(resourceName), "Did you forget to map something new?");

            Assembly dataEntity = typeof(EdmItemCollection).Assembly;
            return dataEntity.GetManifestResourceStream(resourceName);
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:31,代码来源:EntityFrameworkVersions.cs


示例5: GetMap

        // <summary>
        // Search for a Mapping metadata with the specified type key.
        // </summary>
        // <param name="identity"> identity of the type </param>
        // <param name="typeSpace"> The dataspace that the type for which map needs to be returned belongs to </param>
        // <param name="ignoreCase"> true for case-insensitive lookup </param>
        // <exception cref="ArgumentException">Thrown if mapping space is not valid</exception>
        internal virtual MappingBase GetMap(string identity, DataSpace typeSpace, bool ignoreCase)
        {
            DebugCheck.NotNull(identity);

            //will only be implemented by Mapping Item Collections
            throw Error.NotSupported();
        }
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:14,代码来源:MappingItemCollection.cs


示例6: DbCommandTree

        /// <summary>
        /// Initializes a new command tree with a given metadata workspace.
        /// </summary>
        /// <param name="metadata">The metadata workspace against which the command tree should operate.</param>
        /// <param name="dataSpace">The logical 'space' that metadata in the expressions used in this command tree must belong to.</param>
        internal DbCommandTree(MetadataWorkspace metadata, DataSpace dataSpace)
        {
            // Ensure the metadata workspace is non-null
            EntityUtil.CheckArgumentNull(metadata, "metadata");

            // Ensure that the data space value is valid
            if (!DbCommandTree.IsValidDataSpace(dataSpace))
            {
                throw EntityUtil.Argument(System.Data.Entity.Strings.Cqt_CommandTree_InvalidDataSpace, "dataSpace");
            }

            //
            // Create the tree's metadata workspace and initalize commonly used types.
            //
            MetadataWorkspace effectiveMetadata = new MetadataWorkspace();
                
            //While EdmItemCollection and StorageitemCollections are required
            //ObjectItemCollection may or may not be registered on the workspace yet.
            //So register the ObjectItemCollection if it exists.
            ItemCollection objectItemCollection;
            if (metadata.TryGetItemCollection(DataSpace.OSpace, out objectItemCollection))
            {
                effectiveMetadata.RegisterItemCollection(objectItemCollection);
            }                
            effectiveMetadata.RegisterItemCollection(metadata.GetItemCollection(DataSpace.CSpace));
            effectiveMetadata.RegisterItemCollection(metadata.GetItemCollection(DataSpace.CSSpace));
            effectiveMetadata.RegisterItemCollection(metadata.GetItemCollection(DataSpace.SSpace));

            this._metadata = effectiveMetadata;
            this._dataSpace = dataSpace;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:36,代码来源:DbCommandTree.cs


示例7: DbModificationCommandTree

        internal DbModificationCommandTree(MetadataWorkspace metadata, DataSpace dataSpace, DbExpressionBinding target)
            : base(metadata, dataSpace)
        {
            DebugCheck.NotNull(target);

            _target = target;
        }
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:7,代码来源:DbModificationCommandTree.cs


示例8: CollectFilePermissionPaths

 public override void CollectFilePermissionPaths(List<string> paths, DataSpace spaceToGet)
 {
     foreach (var loader in _children)
     {
         loader.CollectFilePermissionPaths(paths, spaceToGet);
     }
 }
开发者ID:jimmy00784,项目名称:entityframework,代码行数:7,代码来源:MetadataArtifactLoaderCompositeResource.cs


示例9: DbModificationCommandTree

        internal DbModificationCommandTree(MetadataWorkspace metadata, DataSpace dataSpace, DbExpressionBinding target)
            : base(metadata, dataSpace)
        {
            EntityUtil.CheckArgumentNull(target, "target");

            this._target = target;
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:7,代码来源:DbModificationCommandTree.cs


示例10: RelationshipType

 /// <summary>
 /// Initializes a new instance of relationship type
 /// </summary>
 /// <param name="name">name of the relationship type</param>
 /// <param name="namespaceName">namespace of the relationship type</param>
 /// <param name="version">version of the relationship type</param>
 /// <param name="dataSpace">dataSpace in which this edmtype belongs to</param>
 /// <exception cref="System.ArgumentNullException">Thrown if either name, namespace or version arguments are null</exception>
 internal RelationshipType(
     string name,
     string namespaceName,
     DataSpace dataSpace)
     : base(name, namespaceName, dataSpace)
 {
 }
开发者ID:jimmy00784,项目名称:entityframework,代码行数:15,代码来源:RelationshipType.cs


示例11: DbDeleteCommandTree

        internal DbDeleteCommandTree(MetadataWorkspace metadata, DataSpace dataSpace, DbExpressionBinding target, DbExpression predicate)
            : base(metadata, dataSpace, target)
        {
            Contract.Requires(predicate != null);

            _predicate = predicate;
        }
开发者ID:junxy,项目名称:entityframework,代码行数:7,代码来源:DbDeleteCommandTree.cs


示例12: DbDeleteCommandTree

        /// <summary>
        /// Initializes a new instance of the <see cref="DbDeleteCommandTree"/> class.
        /// </summary>
        /// <param name="metadata">The model this command will operate on.</param>
        /// <param name="dataSpace">The data space.</param>
        /// <param name="target">The target table for the data manipulation language (DML) operation.</param>
        /// <param name="predicate">A predicate used to determine which members of the target collection should be deleted.</param>
        public DbDeleteCommandTree(MetadataWorkspace metadata, DataSpace dataSpace, DbExpressionBinding target, DbExpression predicate)
            : base(metadata, dataSpace, target)
        {
            DebugCheck.NotNull(predicate);

            _predicate = predicate;
        }
开发者ID:hallco978,项目名称:entityframework,代码行数:14,代码来源:DbDeleteCommandTree.cs


示例13: DbCommandTree

        /// <summary>
        /// Initializes a new command tree with a given metadata workspace.
        /// </summary>
        /// <param name="metadata">The metadata workspace against which the command tree should operate.</param>
        /// <param name="dataSpace">The logical 'space' that metadata in the expressions used in this command tree must belong to.</param>
        internal DbCommandTree(MetadataWorkspace metadata, DataSpace dataSpace)
        {
            // Ensure the metadata workspace is non-null
            //Contract.Requires(metadata != null);

            // Ensure that the data space value is valid
            if (!IsValidDataSpace(dataSpace))
            {
                throw new ArgumentException(Strings.Cqt_CommandTree_InvalidDataSpace, "dataSpace");
            }

            //
            // Create the tree's metadata workspace and initalize commonly used types.
            //
            var effectiveMetadata = new MetadataWorkspace();

            //While EdmItemCollection and StorageitemCollections are required
            //ObjectItemCollection may or may not be registered on the workspace yet.
            //So register the ObjectItemCollection if it exists.
            ItemCollection objectItemCollection;
            if (metadata.TryGetItemCollection(DataSpace.OSpace, out objectItemCollection))
            {
                effectiveMetadata.RegisterItemCollection(objectItemCollection);
            }
            effectiveMetadata.RegisterItemCollection(metadata.GetItemCollection(DataSpace.CSpace));
            effectiveMetadata.RegisterItemCollection(metadata.GetItemCollection(DataSpace.CSSpace));
            effectiveMetadata.RegisterItemCollection(metadata.GetItemCollection(DataSpace.SSpace));

            _metadata = effectiveMetadata;
            _dataSpace = dataSpace;
        }
开发者ID:jimmy00784,项目名称:entityframework,代码行数:36,代码来源:DbCommandTree.cs


示例14: Perspective

        /// <summary>
        /// Creates a new instance of perspective class so that query can work
        /// ignorant of all spaces
        /// </summary>
        /// <param name="metadataWorkspace">runtime metadata container</param>
        /// <param name="targetDataspace">target dataspace for the perspective</param>
        internal Perspective(MetadataWorkspace metadataWorkspace,
                             DataSpace targetDataspace)
        {
            EntityUtil.CheckArgumentNull(metadataWorkspace, "metadataWorkspace");

            m_metadataWorkspace = metadataWorkspace;
            m_targetDataspace = targetDataspace;
        }
开发者ID:uQr,项目名称:referencesource,代码行数:14,代码来源:Perspective.cs


示例15: EdmModel

        public EdmModel(EntityContainer entityContainer, double version = XmlConstants.SchemaVersionLatest)
        {
            Check.NotNull(entityContainer, "entityContainer");

            _dataSpace = entityContainer.DataSpace;
            _containers.Add(entityContainer);
            SchemaVersion = version;
        }
开发者ID:christiandpena,项目名称:entityframework,代码行数:8,代码来源:EdmModel.cs


示例16: CollectFilePermissionPaths

 public override void CollectFilePermissionPaths(List<string> paths, DataSpace spaceToGet)
 {
     if (!_alreadyLoaded
         && IsArtifactOfDataSpace(_path, spaceToGet))
     {
         paths.Add(_path);
     }
 }
开发者ID:WangWilliam,项目名称:EntityFramework5,代码行数:8,代码来源:MetadataArtifactLoaderFile.cs


示例17: DbInsertCommandTree

        internal DbInsertCommandTree(MetadataWorkspace metadata, DataSpace dataSpace, DbExpressionBinding target, ReadOnlyModificationClauses setClauses, DbExpression returning)
            : base(metadata, dataSpace, target)
        {
            EntityUtil.CheckArgumentNull(setClauses, "setClauses");
            // returning may be null

            this._setClauses = setClauses;
            this._returning = returning;
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:9,代码来源:DbInsertCommandTree.cs


示例18: Perspective

        // <summary>
        // Creates a new instance of perspective class so that query can work
        // ignorant of all spaces
        // </summary>
        // <param name="metadataWorkspace"> runtime metadata container </param>
        // <param name="targetDataspace"> target dataspace for the perspective </param>
        internal Perspective(
            MetadataWorkspace metadataWorkspace,
            DataSpace targetDataspace)
        {
            DebugCheck.NotNull(metadataWorkspace);

            _metadataWorkspace = metadataWorkspace;
            _targetDataspace = targetDataspace;
        }
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:15,代码来源:Perspective.cs


示例19: EntityContainer

        /// <summary>
        /// The constructor for constructing the EntityContainer object with the name, namespaceName, and version.
        /// </summary>
        /// <param name="name">The name of this entity container</param>
        /// <param name="dataSpace">dataSpace in which this entity container belongs to</param>
        /// <exception cref="System.ArgumentNullException">Thrown if the name argument is null</exception>
        /// <exception cref="System.ArgumentException">Thrown if the name argument is empty string</exception>
        internal EntityContainer(string name, DataSpace dataSpace)
        {
            EntityUtil.CheckStringArgument(name, "name");

            _name = name;
            this.DataSpace = dataSpace;
            _baseEntitySets = new ReadOnlyMetadataCollection<EntitySetBase>(new EntitySetBaseCollection(this));
            _functionImports = new ReadOnlyMetadataCollection<EdmFunction>(new MetadataCollection<EdmFunction>());
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:16,代码来源:EntityContainer.cs


示例20: AssociationType

 /// <summary>
 /// Initializes a new instance of Association Type with the given name, namespace, version and ends
 /// </summary>
 /// <param name="name">name of the association type</param>
 /// <param name="namespaceName">namespace of the association type</param>
 /// <param name="foreignKey">is this a foreign key (FK) relationship?</param>
 /// <param name="dataSpace">dataSpace in which this AssociationType belongs to</param>
 /// <exception cref="System.ArgumentNullException">Thrown if either the name, namespace or version attributes are null</exception>
 internal AssociationType(string name,
                          string namespaceName,
                          bool foreignKey,
                          DataSpace dataSpace)
     : base(name, namespaceName, dataSpace)
 {
     _referentialConstraints = new ReadOnlyMetadataCollection<ReferentialConstraint>(new MetadataCollection<ReferentialConstraint>());
     _isForeignKey = foreignKey;
 }
开发者ID:uQr,项目名称:referencesource,代码行数:17,代码来源:AssociationType.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# DataStore类代码示例发布时间:2022-05-24
下一篇:
C# DataSource类代码示例发布时间: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