Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System.Activities.Core.Presentation / System / Activities / Core / Presentation / FlowSwitchDefaultLinkFeature.cs
1 //----------------------------------------------------------------
2 // <copyright company="Microsoft Corporation">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //----------------------------------------------------------------
6
7 namespace System.Activities.Core.Presentation
8 {
9     using System.Activities.Presentation;
10     using System.Activities.Presentation.Metadata;
11     using System.ComponentModel;
12     using System.Runtime.Versioning;
13     using Microsoft.Activities.Presentation;
14
15     internal class FlowSwitchDefaultLinkFeature : Feature
16     {
17         public override void Initialize(EditingContext context, Type modelType)
18         {
19             if (context.Services.GetService<DesignerConfigurationService>().TargetFrameworkName.IsLessThan45())
20             {
21                 AttributeTableBuilder builder = new AttributeTableBuilder();
22                 builder.AddCustomAttributes(typeof(FlowSwitchDefaultLink<>), "DefaultCaseDisplayName", BrowsableAttribute.No);
23                 MetadataStore.AddAttributeTable(builder.CreateTable());
24             }
25         }
26     }
27 }