You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@ -0,0 +1,50 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.VisualBasic.Activities
|
||||
{
|
||||
using System;
|
||||
using System.Activities;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime;
|
||||
using System.Xaml;
|
||||
|
||||
[SuppressMessage(FxCop.Category.Naming, FxCop.Rule.TypeNamesShouldNotMatchNamespaces,
|
||||
Justification = "Approved name")]
|
||||
public static class VisualBasic
|
||||
{
|
||||
static AttachableMemberIdentifier settingsPropertyID = new AttachableMemberIdentifier(typeof(VisualBasic), "Settings");
|
||||
|
||||
public static void SetSettings(object target, VisualBasicSettings value)
|
||||
{
|
||||
AttachablePropertyServices.SetProperty(target, settingsPropertyID, value);
|
||||
}
|
||||
|
||||
public static VisualBasicSettings GetSettings(object target)
|
||||
{
|
||||
VisualBasicSettings value;
|
||||
return AttachablePropertyServices.TryGetProperty(target, settingsPropertyID, out value) ? value : null;
|
||||
}
|
||||
|
||||
public static void SetSettingsForImplementation(object target, VisualBasicSettings value)
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
value.SuppressXamlSerialization = true;
|
||||
}
|
||||
SetSettings(target, value);
|
||||
}
|
||||
|
||||
public static bool ShouldSerializeSettings(object target)
|
||||
{
|
||||
VisualBasicSettings settings = VisualBasic.GetSettings(target);
|
||||
|
||||
if (settings != null && settings.SuppressXamlSerialization && target is Activity)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user