コード例 #1
0
		public void Persist(VersionedSchemaObjectBase obj)
		{
			SchemaObjectBase schemaObj = (SchemaObjectBase)obj;
			if (string.IsNullOrEmpty(obj.Schema.SnapshotTable) == false)
				SCSnapshotBasicAdapter.Instance.UpdateCurrentSnapshot(schemaObj, obj.Schema.SnapshotTable, SnapshotModeDefinition.IsInSnapshot);

			if (obj.Schema.ToSchemaObjectSnapshot)
				SCSnapshotBasicAdapter.Instance.UpdateCurrentSnapshot(schemaObj, "SC.SchemaObjectSnapshot", SnapshotModeDefinition.IsInCommonSnapshot);
		}
コード例 #2
0
		/// <summary>
		/// 使用指定的容器对象和成员对象 初始化<see cref="SCMemberRelation"/>的新实例
		/// </summary>
		/// <param name="container">容器对象</param>
		/// <param name="member">成员对象</param>
		/// <param name="schemaType"></param>
		public VersionedSchemaRelationBase(VersionedSchemaObjectBase container, VersionedSchemaObjectBase member, string schemaType) :
			base(schemaType)
		{
			container.NullCheck("container");
			member.NullCheck("member");

			this.ContainerID = container.ID;
			this.ID = member.ID;

			this.ContainerSchemaType = container.SchemaType;
			this.MemberSchemaType = member.SchemaType;
		}
コード例 #3
0
        public void Persist(VersionedSchemaObjectBase obj)
        {
            SchemaObjectBase schemaObj = (SchemaObjectBase)obj;

            if (string.IsNullOrEmpty(obj.Schema.SnapshotTable) == false)
            {
                SCSnapshotBasicAdapter.Instance.UpdateCurrentSnapshot(schemaObj, obj.Schema.SnapshotTable, SnapshotModeDefinition.IsInSnapshot);
            }

            if (obj.Schema.ToSchemaObjectSnapshot)
            {
                SCSnapshotBasicAdapter.Instance.UpdateCurrentSnapshot(schemaObj, "SC.SchemaObjectSnapshot", SnapshotModeDefinition.IsInCommonSnapshot);
            }
        }
コード例 #4
0
        public void Persist(VersionedSchemaObjectBase obj)
        {
            var schemaObj = (DESchemaObjectBase)obj;

            //入实体快照
            obj.Schema.SnapshotTable.IsNotEmpty(tableName =>
                                                DESnapshotBasicAdapter.Instance.UpdateCurrentSnapshot(schemaObj, obj.Schema.SnapshotTable, SnapshotModeDefinition.IsInSnapshot));

            //入SchemaObject快照
            if (obj.Schema.ToSchemaObjectSnapshot)
            {
                DESnapshotBasicAdapter.Instance.UpdateCurrentSnapshot(schemaObj, "DE.SchemaObjectSnapshot", SnapshotModeDefinition.IsInCommonSnapshot);
            }
        }
コード例 #5
0
        public void Persist(VersionedSchemaObjectBase obj)
        {
            if (SCActionContext.Current.Context.ContainsKey("UserAndContainerSnapshotRelation"))
            {
                SCMemberRelation mr = (SCMemberRelation)SCActionContext.Current.Context["UserAndContainerSnapshotRelation"];

                if (mr.Status == SchemaObjectStatus.Normal)
                {
                    UserAndContainerSnapshotAdapter.Instance.Insert(mr);
                }
                else
                {
                    UserAndContainerSnapshotAdapter.Instance.Delete(mr);
                }
            }
        }
コード例 #6
0
        public void Prepare(VersionedSchemaObjectBase obj)
        {
            if (obj is SCMemberRelation)
            {
                SCMemberRelation mr = (SCMemberRelation)obj;

                ObjectSchemaConfigurationElement containerConfig = SchemaDefine.GetSchemaConfig(mr.ContainerSchemaType);
                ObjectSchemaConfigurationElement memberConfig    = SchemaDefine.GetSchemaConfig(mr.MemberSchemaType);

                if (containerConfig != null && memberConfig != null)
                {
                    if (containerConfig.IsUsersContainer && memberConfig.IsUsersContainerMember)
                    {
                        SCActionContext.Current.Context["UserAndContainerSnapshotRelation"] = mr;
                    }
                }
            }
        }
コード例 #7
0
        public void Prepare(VersionedSchemaObjectBase obj)
        {
            if (obj is SCMemberRelation)
            {
                SCMemberRelation mr = (SCMemberRelation)obj;

                ObjectSchemaConfigurationElement containerConfig = SchemaDefine.GetSchemaConfig(mr.ContainerSchemaType);
                ObjectSchemaConfigurationElement memberConfig    = SchemaDefine.GetSchemaConfig(mr.MemberSchemaType);

                if (containerConfig != null && memberConfig != null)
                {
                    if (containerConfig.Name == "AUAdminScopes" && memberConfig.Category == "AUScopeItems")
                    {
                        SCActionContext.Current.Context["ItemAndContainerSnapshotRelation"] = mr;
                    }
                }
            }
        }
コード例 #8
0
 public void Prepare(VersionedSchemaObjectBase obj)
 {
 }
コード例 #9
0
 /// <summary>
 /// 保存数据
 /// </summary>
 /// <param name="obj">一个<see cref="VersionedSchemaObjectBase"/>实例</param>
 public void Persist(VersionedSchemaObjectBase obj)
 {
     this.ForEach(action => action.Persist(obj));
 }
コード例 #10
0
 /// <summary>
 /// 准备数据
 /// </summary>
 /// <param name="obj">一个<see cref="VersionedSchemaObjectBase"/>实例</param>
 public void Prepare(VersionedSchemaObjectBase obj)
 {
     this.ForEach(action => action.Prepare(obj));
 }
コード例 #11
0
        public void Persist(VersionedSchemaObjectBase obj)
        {
            DESchemaObjectBase schemaObj = (DESchemaObjectBase)obj;

            obj.Schema.SnapshotTable.IsNotEmpty(tableName => DESnapshotBasicAdapter.Instance.UpdateCurrentSnapshotStatus(schemaObj));
        }
コード例 #12
0
		public void Prepare(VersionedSchemaObjectBase obj)
		{
		}