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);
		}
		/// <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;
		}
        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);
            }
        }
        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);
                }
            }
        }
        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;
                    }
                }
            }
        }
 public void Prepare(VersionedSchemaObjectBase obj)
 {
 }
 /// <summary>
 /// 保存数据
 /// </summary>
 /// <param name="obj">一个<see cref="VersionedSchemaObjectBase"/>实例</param>
 public void Persist(VersionedSchemaObjectBase obj)
 {
     this.ForEach(action => action.Persist(obj));
 }
 /// <summary>
 /// 准备数据
 /// </summary>
 /// <param name="obj">一个<see cref="VersionedSchemaObjectBase"/>实例</param>
 public void Prepare(VersionedSchemaObjectBase obj)
 {
     this.ForEach(action => action.Prepare(obj));
 }
        public void Persist(VersionedSchemaObjectBase obj)
        {
            DESchemaObjectBase schemaObj = (DESchemaObjectBase)obj;

            obj.Schema.SnapshotTable.IsNotEmpty(tableName => DESnapshotBasicAdapter.Instance.UpdateCurrentSnapshotStatus(schemaObj));
        }
		public void Prepare(VersionedSchemaObjectBase obj)
		{
		}