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


C# SchemaType类代码示例

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


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

示例1: WfOguObject

		/// <summary>
		/// 
		/// </summary>
		/// <param name="obj"></param>
		protected WfOguObject(IOguObject obj, SchemaType st)
		{
			ExceptionHelper.FalseThrow<ArgumentNullException>(obj != null, "obj");

			this.id = obj.ID;
			this.baseObject = obj;
			this.objectType = st;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:12,代码来源:WfOguObject.cs

示例2: FillSchema

        public override DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType)
        {
            if (SelectCommand != null)
            {
                InnerDataAdapter.SelectCommand = RetrieveBaseType(SelectCommand);
            }

            return InnerDataAdapter.FillSchema(dataSet, schemaType);
        }
开发者ID:niallmerrigan,项目名称:Glimpse,代码行数:9,代码来源:GlimpseDbDataAdapter.cs

示例3: Parser

 public Parser(SchemaType schemaType, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventHandler) {
     this.schemaType = schemaType;
     this.nameTable = nameTable;
     this.schemaNames = schemaNames;
     this.eventHandler = eventHandler;
     this.xmlResolver = new XmlUrlResolver();
     processMarkup = true;
     dummyDocument = new XmlDocument();
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:9,代码来源:parser.cs

示例4: Parser

 public Parser(SchemaType schemaType, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventHandler) {
     this.schemaType = schemaType;
     this.nameTable = nameTable;
     this.schemaNames = schemaNames;
     this.eventHandler = eventHandler;
     this.xmlResolver = System.Xml.XmlConfiguration.XmlReaderSection.CreateDefaultResolver();
     processMarkup = true;
     dummyDocument = new XmlDocument();
 }
开发者ID:uQr,项目名称:referencesource,代码行数:9,代码来源:Parser.cs

示例5: FillSchema

        public override DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType)
        {
            if (SelectCommand != null)
            {
                InnerDataAdapter.SelectCommand = ((GlimpseDbCommand)SelectCommand).Inner;
            }

            return InnerDataAdapter.FillSchema(dataSet, schemaType);
        }
开发者ID:shiftkey,项目名称:Glimpse,代码行数:9,代码来源:GlimpseDbDataAdapter.cs

示例6: Parser

 public Parser(SchemaType schemaType, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventHandler)
 {
     _schemaType = schemaType;
     _nameTable = nameTable;
     _schemaNames = schemaNames;
     _eventHandler = eventHandler;
     _xmlResolver = null;
     _processMarkup = true;
     _dummyDocument = new XmlDocument();
 }
开发者ID:dotnet,项目名称:corefx,代码行数:10,代码来源:Parser.cs

示例7: CheckSchemaRoot

        private bool CheckSchemaRoot(SchemaType rootType, out string code)
        {
            code = null;
            if (this.schemaType == SchemaType.None)
            {
                this.schemaType = rootType;
            }
            switch (rootType)
            {
                case SchemaType.None:
                case SchemaType.DTD:
                    code = "Sch_SchemaRootExpected";
                    if (this.schemaType == SchemaType.XSD)
                    {
                        code = "Sch_XSDSchemaRootExpected";
                    }
                    return false;

                case SchemaType.XDR:
                    if (this.schemaType != SchemaType.XSD)
                    {
                        if (this.schemaType != SchemaType.XDR)
                        {
                            code = "Sch_MixSchemaTypes";
                            return false;
                        }
                        break;
                    }
                    code = "Sch_XSDSchemaOnly";
                    return false;

                case SchemaType.XSD:
                    if (this.schemaType == SchemaType.XSD)
                    {
                        break;
                    }
                    code = "Sch_MixSchemaTypes";
                    return false;
            }
            return true;
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:41,代码来源:Parser.cs

示例8: ExtractOguObject

        protected virtual void ExtractOguObject(IDictionary<string, object> dictionary, out SchemaType oguType, out OguBase result)
        {
            string id = (string)dictionary["id"];
            oguType = SchemaType.Users;

            if (dictionary.ContainsKey("objectType"))
                oguType = (SchemaType)dictionary["objectType"];

            result = CreateOguObject(oguType, id);

            result.Description = DictionaryHelper.GetValue(dictionary, "description", string.Empty);
            result.DisplayName = DictionaryHelper.GetValue(dictionary, "displayName", string.Empty);
            result.FullPath = DictionaryHelper.GetValue(dictionary, "fullPath", string.Empty);
            result.GlobalSortID = DictionaryHelper.GetValue(dictionary, "globalSortID", string.Empty);
            result.Name = DictionaryHelper.GetValue(dictionary, "name", string.Empty);
            result.SortID = DictionaryHelper.GetValue(dictionary, "sortID", string.Empty);
            result.Tag = DictionaryHelper.GetValue(dictionary, "tag", string.Empty);
            result.ClientContext = DictionaryHelper.GetValue(dictionary, "clientContext", (Dictionary<string, object>)null);

            if (dictionary.ContainsKey("status"))
                result.Properties["STATUS"] = DictionaryHelper.GetValue(dictionary, "status", 1);
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:22,代码来源:OguConverter.cs

示例9: GetSetter

		private static OguAndADObjectSetterBase GetSetter(ObjectModifyType modifyType, SchemaType schemaType)
		{
			string schemaTypeName = schemaType.ToString();

			string cacheKey = "OguAndADObjectSetterBase" + "-" + modifyType.ToString() + "+" + schemaTypeName;

			return (OguAndADObjectSetterBase)ObjectContextCache.Instance.GetOrAddNewValue(cacheKey, (cache, key) =>
			{
				SchemaMappingInfo mappingInfo = PermissionCenterToADSynchronizeSettings.GetConfig().SchemaMappings.GetSchemaMappingInfo(schemaTypeName);

				OguAndADObjectSetterBase setter = null;

				if (mappingInfo.ModifyOperations.ContainsKey(modifyType.ToString()))
				{
					SetterObjectMappingConfigurationElement objSetterMappingElement = mappingInfo.ModifyOperations[modifyType.ToString()];
					setter = (OguAndADObjectSetterBase)PropertySettersSettings.GetConfig().ObjectSetters[objSetterMappingElement.OperationName].CreateInstance();
				}

				cache.Add(cacheKey, setter);

				return setter;
			});
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:23,代码来源:ObjectSetterHelper.cs

示例10: CreateObject

		/// <summary>
		/// 创建机构人员组对象
		/// </summary>
		/// <param name="type">需要创建的对象类型</param>
		/// <returns></returns>
		public IOguObject CreateObject(SchemaType type)
		{
			OguBaseImpl oBase = null;

			switch (type)
			{
				case SchemaType.Users:
					oBase = new OguUserImpl();
					break;
				case SchemaType.Organizations:
					oBase = new OguOrganizationImpl();
					break;
				case SchemaType.OrganizationsInRole:
					oBase = new OguOrganizationInRoleImpl();
					break;
				case SchemaType.Groups:
					oBase = new OguGroupImpl();
					break;
				default:
					throw new InvalidOperationException(string.Format(Resource.InvalidObjectTypeCreation, type.ToString()));
			}

			return oBase;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:29,代码来源:DefaultOguObjectFactory.cs

示例11: SetupSchema

		internal string SetupSchema (SchemaType schemaType, string sourceTableName)
		{
			DataTableMapping tableMapping = null;

			if (schemaType == SchemaType.Mapped) {
				tableMapping = DataTableMappingCollection.GetTableMappingBySchemaAction (TableMappings, sourceTableName, sourceTableName, MissingMappingAction);
				if (tableMapping != null)
					return tableMapping.DataSetTable;
				return null;
			} else
				return sourceTableName;
		}
开发者ID:carrie901,项目名称:mono,代码行数:12,代码来源:DataAdapter.cs

示例12: SchemaMapping

        internal SchemaMapping(DataAdapter adapter, DataSet dataset, System.Data.DataTable datatable, DataReaderContainer dataReader, bool keyInfo, SchemaType schemaType, string sourceTableName, bool gettingData, DataColumn parentChapterColumn, object parentChapterValue)
        {
            MissingMappingAction missingMappingAction;
            MissingSchemaAction missingSchemaAction;
            this._dataSet = dataset;
            this._dataTable = datatable;
            this._adapter = adapter;
            this._dataReader = dataReader;
            if (keyInfo)
            {
                this._schemaTable = dataReader.GetSchemaTable();
            }
            if (adapter.ShouldSerializeFillLoadOption())
            {
                this._loadOption = adapter.FillLoadOption;
            }
            else if (adapter.AcceptChangesDuringFill)
            {
                this._loadOption = (LoadOption) 4;
            }
            else
            {
                this._loadOption = (LoadOption) 5;
            }
            if (SchemaType.Mapped == schemaType)
            {
                missingMappingAction = this._adapter.MissingMappingAction;
                missingSchemaAction = this._adapter.MissingSchemaAction;
                if (ADP.IsEmpty(sourceTableName))
                {
                    if (this._dataTable != null)
                    {
                        int num2 = this._adapter.IndexOfDataSetTable(this._dataTable.TableName);
                        if (-1 == num2)
                        {
                            switch (missingMappingAction)
                            {
                                case MissingMappingAction.Passthrough:
                                    this._tableMapping = new DataTableMapping(this._dataTable.TableName, this._dataTable.TableName);
                                    goto Label_01DB;

                                case MissingMappingAction.Ignore:
                                    this._tableMapping = null;
                                    goto Label_01DB;

                                case MissingMappingAction.Error:
                                    throw ADP.MissingTableMappingDestination(this._dataTable.TableName);
                            }
                            throw ADP.InvalidMissingMappingAction(missingMappingAction);
                        }
                        this._tableMapping = this._adapter.TableMappings[num2];
                    }
                }
                else
                {
                    this._tableMapping = this._adapter.GetTableMappingBySchemaAction(sourceTableName, sourceTableName, missingMappingAction);
                }
            }
            else
            {
                if (SchemaType.Source != schemaType)
                {
                    throw ADP.InvalidSchemaType(schemaType);
                }
                missingMappingAction = MissingMappingAction.Passthrough;
                missingSchemaAction = MissingSchemaAction.Add;
                if (!ADP.IsEmpty(sourceTableName))
                {
                    this._tableMapping = DataTableMappingCollection.GetTableMappingBySchemaAction(null, sourceTableName, sourceTableName, missingMappingAction);
                }
                else if (this._dataTable != null)
                {
                    int num = this._adapter.IndexOfDataSetTable(this._dataTable.TableName);
                    if (-1 != num)
                    {
                        this._tableMapping = this._adapter.TableMappings[num];
                    }
                    else
                    {
                        this._tableMapping = new DataTableMapping(this._dataTable.TableName, this._dataTable.TableName);
                    }
                }
            }
        Label_01DB:
            if (this._tableMapping != null)
            {
                if (this._dataTable == null)
                {
                    this._dataTable = this._tableMapping.GetDataTableBySchemaAction(this._dataSet, missingSchemaAction);
                }
                if (this._dataTable != null)
                {
                    this._fieldNames = GenerateFieldNames(dataReader);
                    if (this._schemaTable == null)
                    {
                        this._readerDataValues = this.SetupSchemaWithoutKeyInfo(missingMappingAction, missingSchemaAction, gettingData, parentChapterColumn, parentChapterValue);
                        return;
                    }
                    this._readerDataValues = this.SetupSchemaWithKeyInfo(missingMappingAction, missingSchemaAction, gettingData, parentChapterColumn, parentChapterValue);
                }
//.........这里部分代码省略.........
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:101,代码来源:SchemaMapping.cs

示例13: CheckSchemaRoot

        private bool CheckSchemaRoot(SchemaType rootType, out string code)
        {
            code = null;
            if (_schemaType == SchemaType.None)
            {
                _schemaType = rootType;
            }
            switch (rootType)
            {
                case SchemaType.XSD:
                    if (_schemaType != SchemaType.XSD)
                    {
                        code = SR.Sch_MixSchemaTypes;
                        return false;
                    }
                    break;

                case SchemaType.XDR:
                    if (_schemaType == SchemaType.XSD)
                    {
                        code = SR.Sch_XSDSchemaOnly;
                        return false;
                    }
                    else if (_schemaType != SchemaType.XDR)
                    {
                        code = SR.Sch_MixSchemaTypes;
                        return false;
                    }
                    break;

                case SchemaType.DTD: //Did not detect schema type that can be parsed by this parser
                case SchemaType.None:
                    code = SR.Sch_SchemaRootExpected;
                    if (_schemaType == SchemaType.XSD)
                    {
                        code = SR.Sch_XSDSchemaRootExpected;
                    }
                    return false;

                default:
                    Debug.Assert(false);
                    break;
            }
            return true;
        }
开发者ID:dotnet,项目名称:corefx,代码行数:45,代码来源:Parser.cs

示例14: FillSchema

		public abstract DataTable[] FillSchema (DataSet dataSet, SchemaType schemaType);
开发者ID:carrie901,项目名称:mono,代码行数:1,代码来源:DataAdapter.cs

示例15: FillSchema

 protected virtual DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType, IDbCommand command, string srcTable, CommandBehavior behavior)
 {
     long logScopeId = DataCommonEventSource.Log.EnterScope("<comm.DbDataAdapter.FillSchema|API> {0}, dataSet, schemaType, command, srcTable, behavior={1}", ObjectID, behavior);
     try
     {
         if (null == dataSet)
         {
             throw ADP.ArgumentNull(nameof(dataSet));
         }
         if ((SchemaType.Source != schemaType) && (SchemaType.Mapped != schemaType))
         {
             throw ADP.InvalidSchemaType(schemaType);
         }
         if (string.IsNullOrEmpty(srcTable))
         {
             throw ADP.FillSchemaRequiresSourceTableName(nameof(srcTable));
         }
         if (null == command)
         {
             throw ADP.MissingSelectCommand(ADP.FillSchema);
         }
         return (DataTable[])FillSchemaInternal(dataSet, null, schemaType, command, srcTable, behavior);
     }
     finally
     {
         DataCommonEventSource.Log.ExitScope(logScopeId);
     }
 }
开发者ID:dotnet,项目名称:corefx,代码行数:28,代码来源:DbDataAdapter.cs


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