public void Configure(IPluginFamily family)
        {
            if (SourceType != null)
            {
                try
                {
                    var source = (MementoSource)Activator.CreateInstance(SourceType);
                    family.AddMementoSource(source);
                }
                catch (Exception ex)
                {
                    throw new StructureMapException(122, ex, SourceType.FullName,
                                                    family.PluginType.AssemblyQualifiedName);
                }
            }


            if (!string.IsNullOrEmpty(DefaultKey))
            {
                family.DefaultInstanceKey = DefaultKey;
            }
            if (Scope != InstanceScope.PerRequest)
            {
                family.SetScopeTo(Scope);
            }
        }
        public static void ConfigureFamily(IPluginFamily family)
        {
            var att =
                GetCustomAttribute(family.PluginType, typeof (PluginFamilyAttribute), false)
                as PluginFamilyAttribute;

            if (att != null)
            {
                att.Configure(family);
            }
        }
        public static void ConfigureFamily(IPluginFamily family)
        {
            var att =
                GetCustomAttribute(family.PluginType, typeof(PluginFamilyAttribute), false)
                as PluginFamilyAttribute;

            if (att != null)
            {
                att.Configure(family);
            }
        }
        public void Configure(IPluginFamily family)
        {
            if (SourceType != null)
            {
                try
                {
                    var source = (MementoSource) Activator.CreateInstance(SourceType);
                    family.AddMementoSource(source);
                }
                catch (Exception ex)
                {
                    throw new StructureMapException(122, ex, SourceType.FullName,
                                                    family.PluginType.AssemblyQualifiedName);
                }
            }

            if (!string.IsNullOrEmpty(DefaultKey)) family.DefaultInstanceKey = DefaultKey;
            if (Scope != InstanceScope.PerRequest) family.SetScopeTo(Scope);
        }