public static WfClientOguObjectBase CreateWrapperObject(string id, string name, ClientOguSchemaType schemaType)
        {
            WfClientOguObjectBase result = null;

            switch (schemaType)
            {
                case ClientOguSchemaType.Organizations:
                    result = new WfClientOrganization(id, name);
                    break;
                case ClientOguSchemaType.Users:
                    result = new WfClientUser(id, name);
                    break;
                case ClientOguSchemaType.Groups:
                    result = new WfClientGroup(id, name);
                    break;
                default:
                    throw new ApplicationException(string.Format("schemaType错误{0}", schemaType));
            }

            return result;
        }
 public WfClientOguObjectBase(string id, string name, ClientOguSchemaType schemaType)
     : this(schemaType)
 {
     this.ID = id;
     this.Name = name;
 }
 public WfClientOguObjectBase(ClientOguSchemaType schemaType)
 {
     this.ObjectType = schemaType;
 }
 public WfClientOguObjectBase(string id, ClientOguSchemaType schemaType)
     : this(schemaType)
 {
     this.ID = id;
 }
예제 #5
0
 private static SchemaType ToOguSchemaType(this ClientOguSchemaType schemaType)
 {
     return((SchemaType)schemaType);
 }
        public static WfClientOguObjectBase CreateWrapperObject(string id, string name, ClientOguSchemaType schemaType)
        {
            WfClientOguObjectBase result = null;

            switch (schemaType)
            {
            case ClientOguSchemaType.Organizations:
                result = new WfClientOrganization(id, name);
                break;

            case ClientOguSchemaType.Users:
                result = new WfClientUser(id, name);
                break;

            case ClientOguSchemaType.Groups:
                result = new WfClientGroup(id, name);
                break;

            default:
                throw new ApplicationException(string.Format("schemaType错误{0}", schemaType));
            }

            return(result);
        }
 public WfClientOguObjectBase(string id, string name, ClientOguSchemaType schemaType)
     : this(schemaType)
 {
     this.ID   = id;
     this.Name = name;
 }
 public WfClientOguObjectBase(string id, ClientOguSchemaType schemaType)
     : this(schemaType)
 {
     this.ID = id;
 }
 public WfClientOguObjectBase(ClientOguSchemaType schemaType)
 {
     this.ObjectType = schemaType;
 }