Exemplo n.º 1
0
		public void WhenPropertyUsedAsVersionThenRegister()
		{
			var inspector = new ExplicitlyDeclaredModel();
			var mapper = new ModelMapper(inspector);
			mapper.Class<MyClass>(
				map =>
				{
					map.Id(x => x.Id, idmap => { });
					map.Version(x => x.Version, vm => { });
				});

			inspector.IsVersion(For<MyClass>.Property(x => x.Version)).Should().Be.True();
		}
Exemplo n.º 2
0
		public void WhenPropertyVersionFromBaseEntityThenFindItAsVersion()
		{
			var inspector = new ExplicitlyDeclaredModel();
			var mapper = new ModelMapper(inspector);
			mapper.Class<MyClass>(
				map =>
				{
					map.Id(x => x.Id, idmap => { });
					map.Version(x => x.Version, vm => { });
				});

			inspector.IsVersion(For<MyRoot>.Property(x => x.Version)).Should().Be.True();
		}
Exemplo n.º 3
0
        bool IModelInspector.IsVersion(MemberInfo member)
        {
            bool declaredResult = DeclaredPolymorphicMatch(member, m => declaredModel.IsVersion(m));

            return(isVersion(member, declaredResult));
        }