<commit_before>﻿namespace SimpleInjector.CodeSamples
{
    using System;
    using System.Reflection;
    using SimpleInjector.Advanced;

    public enum CreationPolicy { Transient, Scoped, Singleton }

    [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
    public sealed class CreationPolicyAttribute : Attribute
    {
        public CreationPolicyAttribute(CreationPolicy policy)
        {
            this.Policy = policy;
        }

        public CreationPolicy Policy { get; private set; }
    }

    public class AttributeBasedLifestyleSelectionBehavior : ILifestyleSelectionBehavior
    {
        private const CreationPolicy DefaultPolicy = CreationPolicy.Transient;
        private readonly ScopedLifestyle scopedLifestyle;

        public AttributeBasedLifestyleSelectionBehavior(ScopedLifestyle scopedLifestyle)<commit_msg>AttributeTargets.Interface added to attribute of AttributeBasedLifestyleSelectionBehavior in Code Samples.<commit_after>﻿namespace SimpleInjector.CodeSamples
{
    using System;
    using System.Reflection;
    using SimpleInjector.Advanced;

    public enum CreationPolicy { Transient, Scoped, Singleton }

    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, 
        Inherited = false, AllowMultiple = false)]
    public sealed class CreationPolicyAttribute : Attribute
    {
        public CreationPolicyAttribute(CreationPolicy policy)
        {
            this.Policy = policy;
        }

        public CreationPolicy Policy { get; private set; }
    }

    public class AttributeBasedLifestyleSelectionBehavior : ILifestyleSelectionBehavior
    {
        private const CreationPolicy DefaultPolicy = CreationPolicy.Transient;
        private readonly ScopedLifestyle scopedLifestyle;

        public AttributeBasedLifestyleSelectionBehavior(ScopedLifestyle scopedLifestyle)
{'fraction_non_alphanumeric': 0.05125467164975974, 'fraction_numerical': 0.0, 'mean_word_length': 3.768447837150127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '679928', 'n_tokens_mistral': 463, 'n_tokens_neox': 424, 'n_words': 110}