コード例 #1
0
 private TypeBuilder GetTypeBuilder(Type sourceType, ModuleBuilder moduleBuilder)
 {
     return(moduleBuilder.DefineType(
                SnapshotNameGenerator.Generate(sourceType),
                TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Serializable | TypeAttributes.Sealed,
                SnapshotBaseType));
 }
コード例 #2
0
        public bool DoesAggregateSupportsSnapshot(Type aggregateType, Type snapshotType)
        {
            bool hasAttribute        = aggregateType.HasAttribute <DynamicSnapshotAttribute>();
            bool doesSupportSnapshot = snapshotType.Name == SnapshotNameGenerator.Generate(aggregateType);

            return(hasAttribute && doesSupportSnapshot);
        }