コード例 #1
0
        /// <summary>
        /// 使用指定的容器对象和成员对象 初始化<see cref="SCMemberRelation"/>的新实例
        /// </summary>
        /// <param name="container">容器对象</param>
        /// <param name="member">成员对象</param>
        /// <param name="schemaType"></param>
        public SCSimpleRelationBase(SchemaObjectBase container, SchemaObjectBase 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;
        }
コード例 #2
0
        public static UserInfoExtendDataObject ToUserExtendedInfo(this SchemaObjectBase obj)
        {
            obj.NullCheck("obj");

            UserInfoExtendDataObject extendedInfo = new UserInfoExtendDataObject();

            extendedInfo.ID            = obj.ID;
            extendedInfo.IMAddress     = obj.Properties.GetValue("Sip", string.Empty);
            extendedInfo.IntranetEmail = obj.Properties.GetValue("Mail", string.Empty);
            extendedInfo.InternetEmail = obj.Properties.GetValue("Mail", string.Empty);
            extendedInfo.LogonName     = obj.Properties.GetValue("CodeName", string.Empty);
            extendedInfo.Mobile        = obj.Properties.GetValue("MP", string.Empty);
            extendedInfo.OfficeTel     = obj.Properties.GetValue("WP", string.Empty);
            extendedInfo.DisplayName   = obj.Properties.GetValue("Display", string.Empty);

            return(extendedInfo);
        }
コード例 #3
0
ファイル: SCRelationObject.cs プロジェクト: wooln/AK47Source
        /// <summary>
        /// 使用指定的父子对象初始化<see cref="SCRelationObject"/>的新实例
        /// </summary>
        /// <param name="parent">父对象</param>
        /// <param name="child">子对象</param>
        public SCRelationObject(SchemaObjectBase parent, SchemaObjectBase child) :
            base(StandardObjectSchemaType.RelationObjects.ToString())
        {
            parent.NullCheck("parent");
            child.NullCheck("child");
            (parent is ISCRelationContainer).FalseThrow("parent必须实现ISCRelationContainer接口");
            (parent is ISCQualifiedNameObject).FalseThrow("此构造函数要求parent必须实现ISCQualifiedNameObject");
            (child is ISCQualifiedNameObject).FalseThrow("此构造函数要求parent必须实现ISCQualifiedNameObject");

            this.ParentID = parent.ID;
            this.ID       = child.ID;

            CalculateFullPathAndGlobalSort(parent, child);

            this.ParentSchemaType = parent.SchemaType;
            this.ChildSchemaType  = child.SchemaType;
        }