예제 #1
0
 private void RegisterBOTypes(ITypesInfo typesInfo)
 {
     foreach (Type type in _currentObject.GetType().Assembly.GetTypes())
     {
         typesInfo.RegisterEntity(type);
     }
     typesInfo.RegisterEntity(typeof(ReportDataV2));
 }
예제 #2
0
        public void Both_Parts_OF_Many_To_Many_Of_Association_Can_Be_Created_To_Any_Persistent_Member()
        {
            ITypesInfo info           = XafTypesInfo.Instance;
            Type       typeToCreateOn = typeof(User);

            info.RegisterEntity(typeToCreateOn);
            Type typeOfMember = typeof(Analysis);

            info.RegisterEntity(typeOfMember);

            List <XPCustomMemberInfo> members = info.CreateBothPartMembers(typeToCreateOn, typeOfMember, XpoTypesInfoHelper.GetXpoTypeInfoSource().XPDictionary, true, "association");

            assertMemberCreation(members, typeToCreateOn.Name + "s", typeOfMember);
            assertMemberCreation(members, typeOfMember.Name + "s", typeToCreateOn);
        }
예제 #3
0
 protected void RegisterExportedTypes(params Type[] exportedTypes)
 {
     this.exportesTypes.AddRange(exportedTypes);
     foreach (Type exportedType in exportedTypes)
     {
         typesInfo.RegisterEntity(exportedType);
     }
 }
예제 #4
0
        public void An_Associated_Member_Can_Be_Created_To_Any_Perstent_type()
        {
            ITypesInfo info           = XafTypesInfo.Instance;
            Type       typeToCreateOn = typeof(User);

            info.RegisterEntity(typeToCreateOn);
            Type typeOfMember = typeof(Analysis);

            XPCustomMemberInfo member = info.CreateMember(typeToCreateOn, typeOfMember, "association", XpoTypesInfoHelper.GetXpoTypeInfoSource().XPDictionary);

            assertMemberCreation(member, typeOfMember.Name, typeToCreateOn);
        }
예제 #5
0
        public void AN_Association_Collection_Can_Be_Created_To_Any_Persistent_Type()
        {
            ITypesInfo info           = XafTypesInfo.Instance;
            Type       typeToCreateOn = typeof(User);

            info.RegisterEntity(typeToCreateOn);
            Type typeOfCollection = typeof(Analysis);

            XPCustomMemberInfo collection = info.CreateCollection(typeToCreateOn, typeOfCollection, "association",
                                                                  XpoTypesInfoHelper.GetXpoTypeInfoSource().XPDictionary);

            AssociationAttribute attribute = assertMemberCreation(collection, typeOfCollection.Name + "s", typeToCreateOn);

            Assert.AreEqual(typeOfCollection.FullName, attribute.ElementTypeName);
        }
예제 #6
0
 public override void CustomizeTypesInfo(ITypesInfo typesInfo)
 {
     base.CustomizeTypesInfo(typesInfo);
     typesInfo.RegisterEntity("SequenceGeneratorDCObject", typeof(ISequenceGeneratorObject));
 }
 // register your application types here
 private static void RegisterBOTypes(ITypesInfo typesInfo)
 {
     typesInfo.RegisterEntity(typeof(Employee));
 }
예제 #8
0
        public override void Setup(XafApplication application)
        {
            base.Setup(application);
            ITypesInfo typesInfo = application.TypesInfo;

            typesInfo.RegisterEntity("DCUser", typeof(IDCUser));
            typesInfo.RegisterEntity("DCRole", typeof(IDCRole));
            typesInfo.RegisterEntity("DCTypePermissions", typeof(IDCTypePermissions));
            typesInfo.RegisterEntity("DCMemberPermissions", typeof(IDCMemberPermissions));
            typesInfo.RegisterEntity("DCObjectPermissions", typeof(IDCObjectPermissions));

            typesInfo.RegisterEntity("FullAccessObject", typeof(IFullAccessObject));
            typesInfo.RegisterEntity("ProtectedContentObject", typeof(IProtectedContentObject));
            typesInfo.RegisterEntity("ReadOnlyObject", typeof(IReadOnlyObject));
            typesInfo.RegisterEntity("IrremovableObject", typeof(IIrremovableObject));
            typesInfo.RegisterEntity("UncreatableObject", typeof(IUncreatableObject));
            typesInfo.RegisterEntity("MemberLevelSecurityObject", typeof(IMemberLevelSecurityObject));
            typesInfo.RegisterEntity("MemberLevelReferencedObject1", typeof(IMemberLevelReferencedObject1));
            typesInfo.RegisterEntity("MemberLevelReferencedObject2", typeof(IMemberLevelReferencedObject2));
            typesInfo.RegisterEntity("ObjectLevelSecurityObject", typeof(IObjectLevelSecurityObject));
        }
 // register your application types here
 private static void RegisterBOTypes(ITypesInfo typesInfo)
 {
     typesInfo.RegisterEntity(typeof(ReportDataV2));
     typesInfo.RegisterEntity(typeof(Employee));
     // typesInfo.RegisterEntity(typeof(ReportData));
 }
 protected override void LoadTypesInfo(IList<ModuleBase> modules, ITypesInfo typesInfo) {
     foreach (ModuleBase module in modules) {
         allDomainComponents.AddRange(module.BusinessClasses);
         allDomainComponents.AddRange(module.BusinessClassAssemblies.GetBusinessClasses());
     }
     if (security != null) {
         allDomainComponents.AddRange(security.GetBusinessClasses());
     }
     foreach (Type type in allDomainComponents) {
         typesInfo.RegisterEntity(type);
     }
 }