Customizing the schema of the Default Client

Apr 13, 2010 at 1:31 AM
Edited Apr 13, 2010 at 1:32 AM


I tried modifying the Client schema for RmPerson as we discussed by making everything a partial class and then defining my new attributes in a new file called RmPersonCustomAttributes with an object class of RmPerson that is also partial.

This work great for RmPerson and AttributeNames.

Unfortunately the model breaks down when we get to the EnsureSpecificAttributes method.

A partial method can not be declared as protected or overrides AND a partial method can only be defined in one partial class.

I think that basically puts this approach in the ditch.

I think the right approach is for users to derrive a CompanyPerson from the RmPerson object and thena dd their specific attributes there. I am going to try that approach next.

If anyone else has an idea about this - please let me know.


Apr 13, 2010 at 5:15 AM


This works:

namespace PasswordResetExample
    partial class FimDemoPerson : RmPerson
        public FimDemoPerson()
            : base() {}
        /// <summary>
        /// Attribute used for Helpdesk Password Reset Scenarios.
        /// NOT to be confused with ResetPassword which is built-in
        /// to the FIM schema and is used for Self-service password resets.
        /// </summary>
        public bool? PasswordReset
            get { return GetNullable<Boolean>(FimDemoPerson.AttribtueNames.PasswordReset); }
            set { base[FimDemoPerson.AttribtueNames.PasswordReset].Value = value; }

        protected override void EnsureSpecificAttributesExist()
            EnsureAttributeExists(FimDemoPerson.AttribtueNames.PasswordReset, false);

        public sealed class AttribtueNames
            public static RmAttributeName PasswordReset = new RmAttributeName(@"PasswordReset");



I'm not really a developer so I am not sure if this is the ?right? ?best? approach or if we are just going down the wrong path all together and we should encourage others to define their exact schema using the templates and the .ps files.

Anyway, this is what I am going to use in the short-term. Perhaps swe can get some other feedback on this.