Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / Effects / Generated / PixelShader.cs / 1305600 / PixelShader.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// This file was generated, please do not edit it directly.
//
// Please see http://wiki/default.aspx/Microsoft.Projects.Avalon/MilCodeGen.html for more information.
//
//---------------------------------------------------------------------------
using MS.Internal;
using MS.Internal.Collections;
using MS.Internal.KnownBoxes;
using MS.Internal.PresentationCore;
using MS.Utility;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Runtime.InteropServices;
using System.ComponentModel.Design.Serialization;
using System.Text;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Media3D;
using System.Windows.Media.Animation;
using System.Windows.Media.Composition;
using System.Windows.Media.Imaging;
using System.Windows.Markup;
using System.Security;
using System.Security.Permissions;
using SR=MS.Internal.PresentationCore.SR;
using SRID=MS.Internal.PresentationCore.SRID;
// These types are aliased to match the unamanaged names used in interop
using BOOL = System.UInt32;
using WORD = System.UInt16;
using Float = System.Single;
namespace System.Windows.Media.Effects
{
sealed partial class PixelShader : Animatable, DUCE.IResource
{
//-----------------------------------------------------
//
// Public Methods
//
//-----------------------------------------------------
#region Public Methods
///
/// Shadows inherited Clone() with a strongly typed
/// version for convenience.
///
public new PixelShader Clone()
{
return (PixelShader)base.Clone();
}
///
/// Shadows inherited CloneCurrentValue() with a strongly typed
/// version for convenience.
///
public new PixelShader CloneCurrentValue()
{
return (PixelShader)base.CloneCurrentValue();
}
#endregion Public Methods
//------------------------------------------------------
//
// Public Properties
//
//-----------------------------------------------------
private static void UriSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
PixelShader target = ((PixelShader) d);
target.UriSourcePropertyChangedHook(e);
target.PropertyChanged(UriSourceProperty);
}
private static void ShaderRenderModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
PixelShader target = ((PixelShader) d);
target.PropertyChanged(ShaderRenderModeProperty);
}
#region Public Properties
///
/// UriSource - Uri. Default value is null.
///
public Uri UriSource
{
get
{
return (Uri) GetValue(UriSourceProperty);
}
set
{
SetValueInternal(UriSourceProperty, value);
}
}
///
/// ShaderRenderMode - ShaderRenderMode. Default value is ShaderRenderMode.Auto.
///
public ShaderRenderMode ShaderRenderMode
{
get
{
return (ShaderRenderMode) GetValue(ShaderRenderModeProperty);
}
set
{
SetValueInternal(ShaderRenderModeProperty, value);
}
}
#endregion Public Properties
//------------------------------------------------------
//
// Protected Methods
//
//------------------------------------------------------
#region Protected Methods
///
/// Implementation of Freezable.CreateInstanceCore .
///
/// The new Freezable.
protected override Freezable CreateInstanceCore()
{
return new PixelShader();
}
#endregion ProtectedMethods
//-----------------------------------------------------
//
// Internal Methods
//
//------------------------------------------------------
#region Internal Methods
///
/// Critical: This code calls into an unsafe code block
/// TreatAsSafe: This code does not return any critical data.It is ok to expose
/// Channels are safe to call into and do not go cross domain and cross process
///
[SecurityCritical,SecurityTreatAsSafe]
internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCheck)
{
ManualUpdateResource(channel, skipOnChannelCheck);
base.UpdateResource(channel, skipOnChannelCheck);
}
DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel)
{
using (CompositionEngineLock.Acquire())
{
if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_PIXELSHADER))
{
AddRefOnChannelAnimations(channel);
UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ );
}
return _duceResource.GetHandle(channel);
}
}
void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel)
{
using (CompositionEngineLock.Acquire())
{
Debug.Assert(_duceResource.IsOnChannel(channel));
if (_duceResource.ReleaseOnChannel(channel))
{
ReleaseOnChannelAnimations(channel);
}
}
}
DUCE.ResourceHandle DUCE.IResource.GetHandle(DUCE.Channel channel)
{
DUCE.ResourceHandle h;
// Reconsider the need for this lock when removing the MultiChannelResource.
using (CompositionEngineLock.Acquire())
{
h = _duceResource.GetHandle(channel);
}
return h;
}
int DUCE.IResource.GetChannelCount()
{
// must already be in composition lock here
return _duceResource.GetChannelCount();
}
DUCE.Channel DUCE.IResource.GetChannel(int index)
{
// in a lock already
return _duceResource.GetChannel(index);
}
#endregion Internal Methods
//-----------------------------------------------------
//
// Internal Properties
//
//-----------------------------------------------------
#region Internal Properties
//
// This property finds the correct initial size for the _effectiveValues store on the
// current DependencyObject as a performance optimization
//
// This includes:
// UriSource
//
internal override int EffectiveValuesInitialSize
{
get
{
return 1;
}
}
#endregion Internal Properties
//-----------------------------------------------------
//
// Dependency Properties
//
//------------------------------------------------------
#region Dependency Properties
///
/// The DependencyProperty for the PixelShader.UriSource property.
///
public static readonly DependencyProperty UriSourceProperty;
///
/// The DependencyProperty for the PixelShader.ShaderRenderMode property.
///
public static readonly DependencyProperty ShaderRenderModeProperty;
#endregion Dependency Properties
//-----------------------------------------------------
//
// Internal Fields
//
//------------------------------------------------------
#region Internal Fields
internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource();
internal static Uri s_UriSource = null;
internal const ShaderRenderMode c_ShaderRenderMode = ShaderRenderMode.Auto;
#endregion Internal Fields
#region Constructors
//------------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
static PixelShader()
{
// We check our static default fields which are of type Freezable
// to make sure that they are not mutable, otherwise we will throw
// if these get touched by more than one thread in the lifetime
// of your app. (Windows OS Bug #947272)
//
// Initializations
Type typeofThis = typeof(PixelShader);
UriSourceProperty =
RegisterProperty("UriSource",
typeof(Uri),
typeofThis,
null,
new PropertyChangedCallback(UriSourcePropertyChanged),
null,
/* isIndependentlyAnimated = */ false,
/* coerceValueCallback */ null);
ShaderRenderModeProperty =
RegisterProperty("ShaderRenderMode",
typeof(ShaderRenderMode),
typeofThis,
ShaderRenderMode.Auto,
new PropertyChangedCallback(ShaderRenderModePropertyChanged),
new ValidateValueCallback(System.Windows.Media.Effects.ValidateEnums.IsShaderRenderModeValid),
/* isIndependentlyAnimated = */ false,
/* coerceValueCallback */ null);
}
#endregion Constructors
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// This file was generated, please do not edit it directly.
//
// Please see http://wiki/default.aspx/Microsoft.Projects.Avalon/MilCodeGen.html for more information.
//
//---------------------------------------------------------------------------
using MS.Internal;
using MS.Internal.Collections;
using MS.Internal.KnownBoxes;
using MS.Internal.PresentationCore;
using MS.Utility;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Runtime.InteropServices;
using System.ComponentModel.Design.Serialization;
using System.Text;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Media3D;
using System.Windows.Media.Animation;
using System.Windows.Media.Composition;
using System.Windows.Media.Imaging;
using System.Windows.Markup;
using System.Security;
using System.Security.Permissions;
using SR=MS.Internal.PresentationCore.SR;
using SRID=MS.Internal.PresentationCore.SRID;
// These types are aliased to match the unamanaged names used in interop
using BOOL = System.UInt32;
using WORD = System.UInt16;
using Float = System.Single;
namespace System.Windows.Media.Effects
{
sealed partial class PixelShader : Animatable, DUCE.IResource
{
//-----------------------------------------------------
//
// Public Methods
//
//-----------------------------------------------------
#region Public Methods
///
/// Shadows inherited Clone() with a strongly typed
/// version for convenience.
///
public new PixelShader Clone()
{
return (PixelShader)base.Clone();
}
///
/// Shadows inherited CloneCurrentValue() with a strongly typed
/// version for convenience.
///
public new PixelShader CloneCurrentValue()
{
return (PixelShader)base.CloneCurrentValue();
}
#endregion Public Methods
//------------------------------------------------------
//
// Public Properties
//
//-----------------------------------------------------
private static void UriSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
PixelShader target = ((PixelShader) d);
target.UriSourcePropertyChangedHook(e);
target.PropertyChanged(UriSourceProperty);
}
private static void ShaderRenderModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
PixelShader target = ((PixelShader) d);
target.PropertyChanged(ShaderRenderModeProperty);
}
#region Public Properties
///
/// UriSource - Uri. Default value is null.
///
public Uri UriSource
{
get
{
return (Uri) GetValue(UriSourceProperty);
}
set
{
SetValueInternal(UriSourceProperty, value);
}
}
///
/// ShaderRenderMode - ShaderRenderMode. Default value is ShaderRenderMode.Auto.
///
public ShaderRenderMode ShaderRenderMode
{
get
{
return (ShaderRenderMode) GetValue(ShaderRenderModeProperty);
}
set
{
SetValueInternal(ShaderRenderModeProperty, value);
}
}
#endregion Public Properties
//------------------------------------------------------
//
// Protected Methods
//
//------------------------------------------------------
#region Protected Methods
///
/// Implementation of Freezable.CreateInstanceCore .
///
/// The new Freezable.
protected override Freezable CreateInstanceCore()
{
return new PixelShader();
}
#endregion ProtectedMethods
//-----------------------------------------------------
//
// Internal Methods
//
//------------------------------------------------------
#region Internal Methods
///
/// Critical: This code calls into an unsafe code block
/// TreatAsSafe: This code does not return any critical data.It is ok to expose
/// Channels are safe to call into and do not go cross domain and cross process
///
[SecurityCritical,SecurityTreatAsSafe]
internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCheck)
{
ManualUpdateResource(channel, skipOnChannelCheck);
base.UpdateResource(channel, skipOnChannelCheck);
}
DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel)
{
using (CompositionEngineLock.Acquire())
{
if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_PIXELSHADER))
{
AddRefOnChannelAnimations(channel);
UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ );
}
return _duceResource.GetHandle(channel);
}
}
void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel)
{
using (CompositionEngineLock.Acquire())
{
Debug.Assert(_duceResource.IsOnChannel(channel));
if (_duceResource.ReleaseOnChannel(channel))
{
ReleaseOnChannelAnimations(channel);
}
}
}
DUCE.ResourceHandle DUCE.IResource.GetHandle(DUCE.Channel channel)
{
DUCE.ResourceHandle h;
// Reconsider the need for this lock when removing the MultiChannelResource.
using (CompositionEngineLock.Acquire())
{
h = _duceResource.GetHandle(channel);
}
return h;
}
int DUCE.IResource.GetChannelCount()
{
// must already be in composition lock here
return _duceResource.GetChannelCount();
}
DUCE.Channel DUCE.IResource.GetChannel(int index)
{
// in a lock already
return _duceResource.GetChannel(index);
}
#endregion Internal Methods
//-----------------------------------------------------
//
// Internal Properties
//
//-----------------------------------------------------
#region Internal Properties
//
// This property finds the correct initial size for the _effectiveValues store on the
// current DependencyObject as a performance optimization
//
// This includes:
// UriSource
//
internal override int EffectiveValuesInitialSize
{
get
{
return 1;
}
}
#endregion Internal Properties
//-----------------------------------------------------
//
// Dependency Properties
//
//------------------------------------------------------
#region Dependency Properties
///
/// The DependencyProperty for the PixelShader.UriSource property.
///
public static readonly DependencyProperty UriSourceProperty;
///
/// The DependencyProperty for the PixelShader.ShaderRenderMode property.
///
public static readonly DependencyProperty ShaderRenderModeProperty;
#endregion Dependency Properties
//-----------------------------------------------------
//
// Internal Fields
//
//------------------------------------------------------
#region Internal Fields
internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource();
internal static Uri s_UriSource = null;
internal const ShaderRenderMode c_ShaderRenderMode = ShaderRenderMode.Auto;
#endregion Internal Fields
#region Constructors
//------------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
static PixelShader()
{
// We check our static default fields which are of type Freezable
// to make sure that they are not mutable, otherwise we will throw
// if these get touched by more than one thread in the lifetime
// of your app. (Windows OS Bug #947272)
//
// Initializations
Type typeofThis = typeof(PixelShader);
UriSourceProperty =
RegisterProperty("UriSource",
typeof(Uri),
typeofThis,
null,
new PropertyChangedCallback(UriSourcePropertyChanged),
null,
/* isIndependentlyAnimated = */ false,
/* coerceValueCallback */ null);
ShaderRenderModeProperty =
RegisterProperty("ShaderRenderMode",
typeof(ShaderRenderMode),
typeofThis,
ShaderRenderMode.Auto,
new PropertyChangedCallback(ShaderRenderModePropertyChanged),
new ValidateValueCallback(System.Windows.Media.Effects.ValidateEnums.IsShaderRenderModeValid),
/* isIndependentlyAnimated = */ false,
/* coerceValueCallback */ null);
}
#endregion Constructors
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QuaternionAnimationBase.cs
- HttpRequestWrapper.cs
- CompatibleComparer.cs
- XmlNavigatorFilter.cs
- CommandDevice.cs
- EdmConstants.cs
- SchemaNamespaceManager.cs
- InputBinder.cs
- CommandField.cs
- TableAdapterManagerMethodGenerator.cs
- XmlSerializerOperationGenerator.cs
- TableLayoutPanel.cs
- Converter.cs
- ColumnResizeAdorner.cs
- ClassicBorderDecorator.cs
- ExponentialEase.cs
- TransformValueSerializer.cs
- Authorization.cs
- SoapExtensionReflector.cs
- SolidBrush.cs
- CompModSwitches.cs
- METAHEADER.cs
- KeyConstraint.cs
- OletxTransactionFormatter.cs
- PasswordBox.cs
- WebPartVerbsEventArgs.cs
- WorkflowTimerService.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- ValueTypeFixupInfo.cs
- NameSpaceExtractor.cs
- AppSettingsReader.cs
- AuthenticationModulesSection.cs
- AttachedPropertyMethodSelector.cs
- CodeObjectCreateExpression.cs
- DataPagerFieldCollection.cs
- ConfigXmlElement.cs
- CompilationLock.cs
- SqlWriter.cs
- HashHelpers.cs
- dataprotectionpermission.cs
- Type.cs
- EventLogPropertySelector.cs
- ReflectionUtil.cs
- SubMenuStyle.cs
- XLinq.cs
- DataObjectEventArgs.cs
- LicenseProviderAttribute.cs
- ClientSettings.cs
- SoapAttributeAttribute.cs
- CodeAccessPermission.cs
- FactoryId.cs
- Parameter.cs
- TemplateApplicationHelper.cs
- AssemblyAttributesGoHere.cs
- BaseDataListComponentEditor.cs
- FontStretches.cs
- FreeFormDragDropManager.cs
- AnimationClockResource.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ListView.cs
- CodeExporter.cs
- XmlNodeList.cs
- CompositeDataBoundControl.cs
- StorageTypeMapping.cs
- SortableBindingList.cs
- ObjectCloneHelper.cs
- StrongNameUtility.cs
- HttpCachePolicy.cs
- ListComponentEditor.cs
- ExpressionBindings.cs
- DependencyPropertyValueSerializer.cs
- QuaternionAnimationBase.cs
- SparseMemoryStream.cs
- QuadraticEase.cs
- ItemsControl.cs
- OperationContextScope.cs
- SingleAnimationBase.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- CachedRequestParams.cs
- ClientTarget.cs
- LinkArea.cs
- TraceLog.cs
- BuildProvidersCompiler.cs
- ItemChangedEventArgs.cs
- Quaternion.cs
- OleDbFactory.cs
- LineServicesCallbacks.cs
- SQLInt32Storage.cs
- HtmlPageAdapter.cs
- DocumentPageViewAutomationPeer.cs
- DirtyTextRange.cs
- FileSystemEventArgs.cs
- FormViewRow.cs
- PathSegment.cs
- BindToObject.cs
- WebPartConnectionsCancelEventArgs.cs
- CacheOutputQuery.cs
- TransformerTypeCollection.cs
- AttributeInfo.cs
- UnauthorizedWebPart.cs