Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
wpf
提交
4b759636
W
wpf
项目概览
dotNET Platform
/
wpf
12 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
wpf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4b759636
编写于
1月 03, 2022
作者:
L
lindexi
提交者:
GitHub
1月 03, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make some lock object as readonly (#4487)
上级
d21ce7a8
变更
52
显示空白变更内容
内联
并排
Showing
52 changed file
with
55 addition
and
55 deletion
+55
-55
src/Microsoft.DotNet.Wpf/src/Extensions/PresentationFramework-SystemCore/DynamicAccessorImpl.cs
...s/PresentationFramework-SystemCore/DynamicAccessorImpl.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs
...c/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/TypefaceMetricsCache.cs
...ntationCore/MS/internal/FontCache/TypefaceMetricsCache.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs
...ntationCore/MS/internal/IO/Packaging/PreloadedPackages.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs
...ore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs
.../src/PresentationCore/System/IO/Packaging/PackageStore.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs
...tationCore/System/Windows/CoreCompatibilityPreferences.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs
...et.Wpf/src/PresentationCore/System/Windows/DataFormats.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfoHelper.cs
...onCore/System/Windows/Diagnostics/XamlSourceInfoHelper.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRouteFactory.cs
.../src/PresentationCore/System/Windows/EventRouteFactory.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs
...src/PresentationCore/System/Windows/Input/InputManager.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs
...ore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs
...ntationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs
...src/PresentationCore/System/Windows/Media/FactoryMaker.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs
...ntationCore/System/Windows/Media/Imaging/BitmapDecoder.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs
...tationCore/System/Windows/Media/Imaging/BitmapDownload.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs
...Core/System/Windows/Media/textformatting/TextFormatter.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs
...src/PresentationCore/System/Windows/PresentationSource.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppSecurityManager.cs
...ationFramework/MS/Internal/AppModel/AppSecurityManager.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AssemblyFilter.cs
...sentationFramework/MS/Internal/AppModel/AssemblyFilter.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourcePart.cs
...resentationFramework/MS/Internal/AppModel/ResourcePart.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AsyncDataRequest.cs
...resentationFramework/MS/Internal/Data/AsyncDataRequest.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindEngine.cs
.../PresentationFramework/MS/Internal/Data/DataBindEngine.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingList.cs
...PresentationFramework/MS/Internal/Data/LiveShapingList.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/HighContrastHelper.cs
...esentationFramework/MS/Internal/Ink/HighContrastHelper.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsCache.cs
...src/PresentationFramework/MS/Internal/PtsHost/PtsCache.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/AnnotationStore.cs
...ork/System/Windows/Annotations/Storage/AnnotationStore.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryDiagnostics.cs
...stem/Windows/Diagnostics/ResourceDictionaryDiagnostics.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Tracing/SpellerCOMActionTraceLogger.cs
.../Windows/Documents/Tracing/SpellerCOMActionTraceLogger.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkCompatibilityPreferences.cs
...ework/System/Windows/FrameworkCompatibilityPreferences.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElementFactory.cs
...tationFramework/System/Windows/FrameworkElementFactory.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006SchemaContext.cs
...k/System/Windows/Markup/Baml2006/Baml2006SchemaContext.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedXamlSchemaContext.cs
...tem/Windows/Markup/Baml2006/WpfSharedXamlSchemaContext.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ElementMarkupObject.cs
...k/System/Windows/Markup/Primitives/ElementMarkupObject.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/MarkupWriter.cs
...ramework/System/Windows/Markup/Primitives/MarkupWriter.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapperSchemaContext.cs
...work/System/Windows/Markup/XamlTypeMapperSchemaContext.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerBase.cs
...f/src/PresentationFramework/System/Windows/TriggerBase.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggingProvider.cs
....Wpf/src/Shared/Telemetry/Managed/TraceLoggingProvider.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/NativeMethods.cs
...Ribbon/Microsoft/Windows/Controls/Ribbon/NativeMethods.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs
.../src/System.Xaml/System/Windows/Markup/ValueSerializer.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/ClassicBorderDecorator.cs
...lassic/Microsoft/Windows/Themes/ClassicBorderDecorator.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/MS/Internal/Automation/ClientEventManager.cs
...mationClient/MS/Internal/Automation/ClientEventManager.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/MS/Internal/Automation/ProxyManager.cs
...UIAutomationClient/MS/Internal/Automation/ProxyManager.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/System/Windows/Automation/CacheRequest.cs
...utomationClient/System/Windows/Automation/CacheRequest.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/MS/Internal/AutomationProxies/EventManager.cs
...deProviders/MS/Internal/AutomationProxies/EventManager.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/MS/Internal/AutomationProxies/WinEventTracker.cs
...roviders/MS/Internal/AutomationProxies/WinEventTracker.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/BaseCompatibilityPreferences.cs
...indowsBase/System/Windows/BaseCompatibilityPreferences.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyObjectType.cs
...pf/src/WindowsBase/System/Windows/DependencyObjectType.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Threading/Dispatcher.cs
...pf/src/WindowsBase/System/Windows/Threading/Dispatcher.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Threading/DispatcherHooks.cs
...c/WindowsBase/System/Windows/Threading/DispatcherHooks.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Threading/DispatcherTimer.cs
...c/WindowsBase/System/Windows/Threading/DispatcherTimer.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/WindowsFormsIntegration/System/Windows/Integration/ApplicationInterop.cs
...egration/System/Windows/Integration/ApplicationInterop.cs
+1
-1
未找到文件。
src/Microsoft.DotNet.Wpf/src/Extensions/PresentationFramework-SystemCore/DynamicAccessorImpl.cs
浏览文件 @
4b759636
...
...
@@ -156,7 +156,7 @@ public static DynamicIndexerAccessor GetIndexerAccessor(int rank)
MulticastDelegate
_getterDelegate
,
_setterDelegate
;
static
DynamicIndexerAccessor
[]
_accessors
=
new
DynamicIndexerAccessor
[
1
];
static
object
_lock
=
new
object
();
static
readonly
object
_lock
=
new
object
();
}
#
endregion
DynamicIndexerAccessor
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs
浏览文件 @
4b759636
...
...
@@ -315,7 +315,7 @@ internal static string CompositeFontExtension
private
const
string
EmptyFontFamilyReference
=
"#"
;
private
const
string
EmptyCanonicalName
=
""
;
private
static
object
_dpiLock
=
new
object
();
private
static
readonly
object
_dpiLock
=
new
object
();
private
static
int
_dpi
;
private
static
bool
_dpiInitialized
=
false
;
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/TypefaceMetricsCache.cs
浏览文件 @
4b759636
...
...
@@ -68,7 +68,7 @@ internal static void Add(object key, object value)
}
private
static
Hashtable
_hashTable
=
new
Hashtable
(
MaxCacheCapacity
);
private
static
object
_lock
=
new
object
();
private
static
readonly
object
_lock
=
new
object
();
private
const
int
MaxCacheCapacity
=
64
;
// Maximum cache capacity
}
}
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs
浏览文件 @
4b759636
...
...
@@ -241,7 +241,7 @@ internal bool ThreadSafe
// Hashtable. HybridDictionary already has functionality of switching between
// ListDictionary and Hashtable depending on the size of the collection
static
private
HybridDictionary
_packagePairs
;
static
private
Object
_globalLock
;
static
private
readonly
Object
_globalLock
;
#
endregion
Private
Fields
}
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs
浏览文件 @
4b759636
...
...
@@ -834,7 +834,7 @@ enum RECO_TYPE : ushort
/// <summary>
/// Used to lock for instancing the native recognizer handle
/// </summary>
private
static
object
_syncRoot
=
new
object
();
private
static
readonly
object
_syncRoot
=
new
object
();
/// <summary>
/// All NativeRecognizer share a single handle to the recognizer
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs
浏览文件 @
4b759636
...
...
@@ -172,7 +172,7 @@ private static void ValidatePackageUri(Uri uri)
// Hashtable. HybridDictionary already has functionality of switching between
// ListDictionary and Hashtable depending on the size of the collection
static
private
HybridDictionary
_packages
;
static
private
Object
_globalLock
;
static
private
readonly
Object
_globalLock
;
#
endregion
Private
Fields
}
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs
浏览文件 @
4b759636
...
...
@@ -187,6 +187,6 @@ private static void Seal()
}
private
static
bool
_isSealed
;
private
static
object
_lockObject
=
new
object
();
private
static
readonly
object
_lockObject
=
new
object
();
}
}
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs
浏览文件 @
4b759636
...
...
@@ -470,7 +470,7 @@ private static void EnsurePredefined()
private
static
ArrayList
_formatList
;
// This object is for locking the _formatList to access safe in the multi-thread.
private
static
Object
_formatListlock
=
new
Object
();
private
static
readonly
Object
_formatListlock
=
new
Object
();
#
endregion
Private
Fields
}
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/XamlSourceInfoHelper.cs
浏览文件 @
4b759636
...
...
@@ -38,7 +38,7 @@ internal static class XamlSourceInfoHelper
private
static
ConditionalWeakTable
<
object
,
XamlSourceInfo
>
s_sourceInfoTable
;
// no storage by default
// While ConditionalWeakTable is thread safe we need to make multiple calls in a thread safe manner.
private
static
object
s_lock
=
new
object
();
private
static
readonly
object
s_lock
=
new
object
();
private
static
PropertyInfo
s_sourceBamlUriProperty
;
private
static
PropertyInfo
s_elementLineNumberProperty
;
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRouteFactory.cs
浏览文件 @
4b759636
...
...
@@ -98,7 +98,7 @@ private static EventRoute Pop()
private
static
EventRoute
[]
_eventRouteStack
;
private
static
int
_stackTop
;
private
static
object
_synchronized
=
new
object
();
private
static
readonly
object
_synchronized
=
new
object
();
#
endregion
Data
}
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs
浏览文件 @
4b759636
...
...
@@ -1005,7 +1005,7 @@ private void RequestContinueProcessingStagingArea()
private
static
DispatcherOperation
_synchronizedInputAsyncClearOperation
;
// Lock used to serialize access to synchronized input related static fields.
private
static
object
_synchronizedInputLock
=
new
object
();
private
static
readonly
object
_synchronizedInputLock
=
new
object
();
}
}
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs
浏览文件 @
4b759636
...
...
@@ -1234,7 +1234,7 @@ private void DestroyRealTimeVisuals()
// For OnRenderComplete support (for UI Thread)
EventHandler
_onRenderComplete
;
bool
_waitingForRenderComplete
;
object
__siLock
=
new
object
();
readonly
object
__siLock
=
new
object
();
private
StrokeInfo
_renderCompleteStrokeInfo
;
// On internal real time ink rendering thread.
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs
浏览文件 @
4b759636
...
...
@@ -3673,11 +3673,11 @@ internal long IncrementVersion()
bool
_inputEnabled
=
false
;
bool
_updatingScreenMeasurements
=
false
;
DispatcherOperationCallback
_processDisplayChanged
;
object
__penContextsLock
=
new
object
();
readonly
object
__penContextsLock
=
new
object
();
Dictionary
<
object
,
PenContexts
>
__penContextsMap
=
new
Dictionary
<
object
,
PenContexts
>(
2
);
object
__stylusDeviceLock
=
new
object
();
readonly
object
__stylusDeviceLock
=
new
object
();
Dictionary
<
int
,
StylusDevice
>
__stylusDeviceMap
=
new
Dictionary
<
int
,
StylusDevice
>(
2
);
bool
_inDragDrop
;
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs
浏览文件 @
4b759636
...
...
@@ -139,7 +139,7 @@ internal IntPtr ImagingFactoryPtr
/// "FactoryMaker" is free threaded. This lock is used to synchronize
/// access to the FactoryMaker.
/// </summary>
private
static
object
s_factoryMakerLock
=
new
object
();
private
static
readonly
object
s_factoryMakerLock
=
new
object
();
private
bool
_fValidObject
;
}
}
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs
浏览文件 @
4b759636
...
...
@@ -1687,7 +1687,7 @@ internal bool CanConvertToString()
internal
UniqueEventHelper
<
ExceptionEventArgs
>
_failedEvent
=
new
UniqueEventHelper
<
ExceptionEventArgs
>();
/// SyncObject
private
object
_syncObject
=
new
Object
();
private
readonly
object
_syncObject
=
new
Object
();
// For UnmanagedMemoryStream we want to make sure that buffer
// its pointing to is not getting release until decoder is alive
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs
浏览文件 @
4b759636
...
...
@@ -472,7 +472,7 @@ Exception e
private
static
Thread
_thread
;
/// lock object
private
static
object
_syncLock
;
private
static
readonly
object
_syncLock
;
/// Default async read size
private
const
int
READ_SIZE
=
1024
;
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs
浏览文件 @
4b759636
...
...
@@ -35,7 +35,7 @@ namespace System.Windows.Media.TextFormatting
/// </summary>
public
abstract
class
TextFormatter
:
IDisposable
{
private
static
object
_staticLock
=
new
object
();
private
static
readonly
object
_staticLock
=
new
object
();
/// <summary>
/// Client to create a new instance of TextFormatter
...
...
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs
浏览文件 @
4b759636
...
...
@@ -792,7 +792,7 @@ private static PresentationSource FindSource(DependencyObject o, bool enable2DTo
private
static
readonly
RoutedEvent
SourceChangedEvent
=
EventManager
.
RegisterRoutedEvent
(
"SourceChanged"
,
RoutingStrategy
.
Direct
,
typeof
(
SourceChangedEventHandler
),
typeof
(
PresentationSource
));
// The lock we use to protect our static data.
private
static
object
_globalLock
=
new
object
();
private
static
readonly
object
_globalLock
=
new
object
();
// An array of weak-references to sources that we know about.
private
static
WeakReferenceList
_sources
=
new
WeakReferenceList
(
_globalLock
);
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AppSecurityManager.cs
浏览文件 @
4b759636
...
...
@@ -427,7 +427,7 @@ internal class InternetSecurityManager
// Object to be used for locking. Using typeof(Util) causes an FxCop
// violation DoNotLockOnObjectsWithWeakIdentity
private
static
object
_lockObj
=
new
object
();
private
static
readonly
object
_lockObj
=
new
object
();
private
static
UnsafeNativeMethods
.
IInternetSecurityManager
_secMgr
;
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/AssemblyFilter.cs
浏览文件 @
4b759636
...
...
@@ -104,7 +104,7 @@ private void ExtractDisallowedRegistryList()
static
SecurityCriticalDataForSet
<
bool
>
_disallowedListExtracted
;
static
object
_lock
=
new
object
();
static
readonly
object
_lock
=
new
object
();
private
const
string
FILEVERSION_STRING
=
@", FileVersion="
;
// This is the location in the registry where all the keys are stored
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/AppModel/ResourcePart.cs
浏览文件 @
4b759636
...
...
@@ -185,7 +185,7 @@ private Stream EnsureResourceLocationSet()
private
SecurityCriticalDataForSet
<
ResourceManagerWrapper
>
_rmWrapper
;
private
bool
_ensureResourceIsCalled
=
false
;
private
string
_name
;
private
Object
_globalLock
=
new
Object
();
private
readonly
Object
_globalLock
=
new
Object
();
#
endregion
Private
Members
}
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/AsyncDataRequest.cs
浏览文件 @
4b759636
...
...
@@ -219,7 +219,7 @@ bool ChangeStatus(AsyncRequestStatus newStatus)
AsyncRequestCallback
_workCallback
;
AsyncRequestCallback
_completedCallback
;
object
SyncRoot
=
new
object
();
// for synchronization
readonly
object
SyncRoot
=
new
object
();
// for synchronization
}
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/DataBindEngine.cs
浏览文件 @
4b759636
...
...
@@ -755,7 +755,7 @@ internal override void OnShutDown(object target, object sender, EventArgs e)
private
CleanupHelper
_cleanupHelper
;
private
Queue
<
DataBindOperation
>
_crossThreadQueue
=
new
Queue
<
DataBindOperation
>();
private
object
_crossThreadQueueLock
=
new
object
();
private
readonly
object
_crossThreadQueueLock
=
new
object
();
private
int
_crossThreadCost
;
private
DispatcherOperation
_crossThreadDispatcherOperation
;
internal
const
int
CrossThreadThreshold
=
50000
;
// 50 msec
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/LiveShapingList.cs
浏览文件 @
4b759636
...
...
@@ -799,7 +799,7 @@ object IEnumerator.Current
static
List
<
DependencyProperty
>
s_dpList
=
new
List
<
DependencyProperty
>();
// static list of DPs, shared by all instances of lists
static
object
s_Sync
=
new
object
();
// lock for s_dpList
static
readonly
object
s_Sync
=
new
object
();
// lock for s_dpList
#
endregion
}
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Ink/HighContrastHelper.cs
浏览文件 @
4b759636
...
...
@@ -215,7 +215,7 @@ private static void OnUpdateHighContrast(HighContrastCallback highContrastCallba
#
region
Private
Fields
private
static
object
__lock
=
new
object
();
private
static
readonly
object
__lock
=
new
object
();
private
static
List
<
WeakReference
>
__highContrastCallbackList
;
private
static
int
__increaseCount
;
private
const
int
CleanTolerance
=
100
;
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsCache.cs
浏览文件 @
4b759636
...
...
@@ -765,7 +765,7 @@ private unsafe void InitTableObjInfo(PtsHost ptsHost, ref PTS.FSTABLEOBJINIT tab
/// <summary>
/// Lock.
/// </summary>
private
object
_lock
=
new
object
();
private
readonly
object
_lock
=
new
object
();
/// <summary>
/// Whether object is already disposed.
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Annotations/Storage/AnnotationStore.cs
浏览文件 @
4b759636
...
...
@@ -392,7 +392,7 @@ protected bool IsDisposed
private
bool
_disposed
=
false
;
/// Private object used for synchronization
private
Object
lockObject
=
new
Object
();
private
readonly
Object
lockObject
=
new
Object
();
#
endregion
Private
Fields
}
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Diagnostics/ResourceDictionaryDiagnostics.cs
浏览文件 @
4b759636
...
...
@@ -273,7 +273,7 @@ private static void RemoveResourceDictionaryForUriImpl(Uri uri, ResourceDictiona
}
private
static
Dictionary
<
Uri
,
List
<
WeakReference
<
ResourceDictionary
>>>
_dictionariesFromUri
;
private
static
object
_dictionariesFromUriLock
=
new
object
();
private
static
readonly
object
_dictionariesFromUriLock
=
new
object
();
private
static
IReadOnlyCollection
<
ResourceDictionary
>
EmptyResourceDictionaries
=>
Array
.
Empty
<
ResourceDictionary
>();
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Tracing/SpellerCOMActionTraceLogger.cs
浏览文件 @
4b759636
...
...
@@ -114,7 +114,7 @@ private class InstanceInfo
/// A lock object to serialize updates to <see cref="_instanceInfos"/>
/// and the <see cref="InstanceInfo"/> instances contained therein.
/// </summary>
private
static
object
_lockObject
=
new
object
();
private
static
readonly
object
_lockObject
=
new
object
();
/// <summary>
/// The current COM action being tracked
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkCompatibilityPreferences.cs
浏览文件 @
4b759636
...
...
@@ -478,6 +478,6 @@ private static void Seal()
}
private
static
bool
_isSealed
;
private
static
object
_lockObject
=
new
object
();
private
static
readonly
object
_lockObject
=
new
object
();
}
}
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElementFactory.cs
浏览文件 @
4b759636
...
...
@@ -1320,7 +1320,7 @@ private bool IsValueDefined(DependencyProperty dp)
private
FrameworkElementFactory
_nextSibling
;
// Instance-based synchronization
private
object
_synchronized
=
new
object
();
private
readonly
object
_synchronized
=
new
object
();
}
}
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/Baml2006SchemaContext.cs
浏览文件 @
4b759636
...
...
@@ -708,7 +708,7 @@ private bool TryGetBamlProperty(Int16 propertyId, out BamlProperty bamlProperty,
private
static
readonly
Lazy
<
XamlType
>
_staticResourceExtensionType
=
new
Lazy
<
XamlType
>(()
=>
System
.
Windows
.
Markup
.
XamlReader
.
BamlSharedSchemaContext
.
GetXamlType
(
typeof
(
StaticResourceExtension
)));
private
object
_syncObject
=
new
object
();
private
readonly
object
_syncObject
=
new
object
();
private
Assembly
_localAssembly
;
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfSharedXamlSchemaContext.cs
浏览文件 @
4b759636
...
...
@@ -64,7 +64,7 @@ internal XamlType GetXamlTypeInternal(string xamlNamespace, string name, params
}
private
Dictionary
<
Type
,
XamlType
>
_masterTypeTable
=
new
Dictionary
<
Type
,
XamlType
>();
private
object
_syncObject
=
new
Object
();
private
readonly
object
_syncObject
=
new
Object
();
private
bool
_useV3Rules
;
}
}
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/ElementMarkupObject.cs
浏览文件 @
4b759636
...
...
@@ -406,7 +406,7 @@ private bool TryGetConstructorInfoArguments(object instance, out ParameterInfo[]
return
false
;
}
private
static
object
_shouldSerializeCacheLock
=
new
object
();
private
static
readonly
object
_shouldSerializeCacheLock
=
new
object
();
private
static
Hashtable
_shouldSerializeCache
=
new
Hashtable
();
private
static
Type
[]
_shouldSerializeArgsObject
=
new
Type
[]
{
typeof
(
DependencyObject
)
};
private
static
Type
[]
_shouldSerializeArgsManager
=
new
Type
[]
{
typeof
(
XamlDesignerSerializationManager
)
};
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Primitives/MarkupWriter.cs
浏览文件 @
4b759636
...
...
@@ -1561,7 +1561,7 @@ private static class NamespaceCache
{
private
static
Dictionary
<
Assembly
,
Dictionary
<
string
,
string
>>
XmlnsDefinitions
=
new
Dictionary
<
Assembly
,
Dictionary
<
string
,
string
>>();
private
static
Dictionary
<
string
,
string
>
DefaultPrefixes
=
new
Dictionary
<
string
,
string
>();
private
static
object
SyncObject
=
new
object
();
private
static
readonly
object
SyncObject
=
new
object
();
static
Dictionary
<
string
,
string
>
GetMappingsFor
(
Assembly
assembly
)
{
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapperSchemaContext.cs
浏览文件 @
4b759636
...
...
@@ -24,7 +24,7 @@ internal class XamlTypeMapperSchemaContext : XamlSchemaContext
WpfSharedXamlSchemaContext
_sharedSchemaContext
;
// Lock on syncObject
object
syncObject
=
new
object
();
readonly
object
syncObject
=
new
object
();
Dictionary
<
string
,
string
>
_piNamespaces
;
IEnumerable
<
string
>
_allXamlNamespaces
;
Dictionary
<
Type
,
XamlType
>
_allowedInternalTypes
;
...
...
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/TriggerBase.cs
浏览文件 @
4b759636
...
...
@@ -393,7 +393,7 @@ internal TriggerCondition[] TriggerConditions
/* property */
internal
FrugalStructList
<
System
.
Windows
.
PropertyValue
>
PropertyValues
=
new
FrugalStructList
<
System
.
Windows
.
PropertyValue
>();
// Global, cross-object synchronization
private
static
object
Synchronized
=
new
object
();
private
static
readonly
object
Synchronized
=
new
object
();
// Conditions
TriggerCondition
[]
_triggerConditions
;
...
...
src/Microsoft.DotNet.Wpf/src/Shared/Telemetry/Managed/TraceLoggingProvider.cs
浏览文件 @
4b759636
...
...
@@ -51,7 +51,7 @@ internal static EventSource GetProvider()
}
private
static
EventSource
_logger
;
private
static
object
_lockObject
=
new
object
();
private
static
readonly
object
_lockObject
=
new
object
();
#if WINDOWS_BASE
/// <summary>
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/NativeMethods.cs
浏览文件 @
4b759636
...
...
@@ -441,7 +441,7 @@ internal static class HandleCollector
private
static
HandleType
[]
handleTypes
;
private
static
int
handleTypeCount
=
0
;
private
static
Object
handleMutex
=
new
Object
();
private
static
readonly
Object
handleMutex
=
new
Object
();
/// <devdoc>
/// Adds the given handle to the handle collector. This keeps the
...
...
src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs
浏览文件 @
4b759636
...
...
@@ -284,7 +284,7 @@ protected Exception GetConvertFromException(object value)
TypeDescriptor
.
Refreshed
+=
TypeDescriptorRefreshed
;
}
private
static
object
_valueSerializersLock
=
new
object
();
private
static
readonly
object
_valueSerializersLock
=
new
object
();
private
static
Hashtable
_valueSerializers
=
new
Hashtable
();
}
}
src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Microsoft/Windows/Themes/ClassicBorderDecorator.cs
浏览文件 @
4b759636
...
...
@@ -505,7 +505,7 @@ private static bool IsValidBorderStyle(object o)
/// If BorderBrush is not set to ClassicBorderBrush, a flat style is drawn
/// </summary>
private
static
Brush
_classicBorderBrush
;
private
static
object
_brushLock
=
new
object
();
private
static
readonly
object
_brushLock
=
new
object
();
public
static
Brush
ClassicBorderBrush
{
...
...
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/MS/Internal/Automation/ClientEventManager.cs
浏览文件 @
4b759636
...
...
@@ -731,7 +731,7 @@ private enum Tracker
private
static
QueueProcessor
_callbackQueue
;
// callbacks are queued on this class to avoid deadlocks
private
static
bool
_isBkgrdThreadRunning
=
false
;
// is there a background thread for queueing and recieving WinEvents?
private
static
ArrayList
_listeners
;
// data representing events the client is listening for
private
static
object
_classLock
=
new
object
();
// use lock object vs typeof(class) for perf reasons
private
static
readonly
object
_classLock
=
new
object
();
// use lock object vs typeof(class) for perf reasons
#
endregion
Private
Fields
}
...
...
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/MS/Internal/Automation/ProxyManager.cs
浏览文件 @
4b759636
...
...
@@ -828,7 +828,7 @@ private enum ProxyScoping
FallbackHandlers
,
}
private
static
object
_lockObj
=
new
object
();
private
static
readonly
object
_lockObj
=
new
object
();
// contains ClientSideProviderDescription structs or an Arraylist of ClientSideProviderDescription structs
private
static
Hashtable
_classHandlers
=
new
Hashtable
(
22
,
1.0f
);
...
...
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/System/Windows/Automation/CacheRequest.cs
浏览文件 @
4b759636
...
...
@@ -512,7 +512,7 @@ void Invalidate()
int
_refCount
=
0
;
// Used to lock on this instance...
object
_instanceLock
=
null
;
readonly
object
_instanceLock
=
null
;
//--- Per-Thread state ---
...
...
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/MS/Internal/AutomationProxies/EventManager.cs
浏览文件 @
4b759636
...
...
@@ -582,7 +582,7 @@ private static void InitObjectIdMenu()
private
static
Hashtable
_objectIdScroll
;
private
static
Hashtable
_objectIdCaret
;
private
static
Hashtable
_objectIdMenu
;
private
static
object
_classLock
=
new
object
();
// use lock object vs typeof(class) for perf
private
static
readonly
object
_classLock
=
new
object
();
// use lock object vs typeof(class) for perf
// The hwndLast and objLast is to allow limited filtering of events.
private
static
IntPtr
_hwndLast
=
IntPtr
.
Zero
;
...
...
src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/MS/Internal/AutomationProxies/WinEventTracker.cs
浏览文件 @
4b759636
...
...
@@ -589,7 +589,7 @@ private enum EventFlag
// WinEventHooks must be processed in the same thread that created them.
// Use a seperate thread to manage the hooks
private
static
QueueProcessor
_callbackQueue
=
null
;
private
static
object
_queueLock
=
new
object
();
private
static
readonly
object
_queueLock
=
new
object
();
// static: Array of Hashtables, one per WinEvent Id.
// Each Hashtable contains EventHookParams classes the key is the process id.
...
...
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/BaseCompatibilityPreferences.cs
浏览文件 @
4b759636
...
...
@@ -385,6 +385,6 @@ private static void Seal()
}
private
static
bool
_isSealed
;
private
static
object
_lockObject
=
new
object
();
private
static
readonly
object
_lockObject
=
new
object
();
}
}
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyObjectType.cs
浏览文件 @
4b759636
...
...
@@ -231,7 +231,7 @@ private DependencyObjectType()
// Synchronized: Covered by DispatcherLock
private
static
int
DTypeCount
=
0
;
private
static
object
_lock
=
new
object
();
private
static
readonly
object
_lock
=
new
object
();
}
}
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Threading/Dispatcher.cs
浏览文件 @
4b759636
...
...
@@ -2879,7 +2879,7 @@ private object[] CombineParameters(object arg, object[] args)
private
static
List
<
WeakReference
>
_dispatchers
;
private
static
WeakReference
_possibleDispatcher
;
private
static
object
_globalLock
;
private
static
readonly
object
_globalLock
;
[
ThreadStatic
]
private
static
Dispatcher
_tlsDispatcher
;
// use TLS for ownership only
...
...
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Threading/DispatcherHooks.cs
浏览文件 @
4b759636
...
...
@@ -243,7 +243,7 @@ internal void RaiseOperationAborted(Dispatcher dispatcher, DispatcherOperation o
}
}
private
object
_instanceLock
=
new
object
();
private
readonly
object
_instanceLock
=
new
object
();
private
EventHandler
_dispatcherInactive
;
...
...
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Threading/DispatcherTimer.cs
浏览文件 @
4b759636
...
...
@@ -319,7 +319,7 @@ private object FireTick()
}
// This is the object we use to synchronize access.
private
object
_instanceLock
=
new
object
();
private
readonly
object
_instanceLock
=
new
object
();
// Note: We cannot BE a dispatcher-affinity object because we can be
// created by a worker thread. We are still associated with a
...
...
src/Microsoft.DotNet.Wpf/src/WindowsFormsIntegration/System/Windows/Integration/ApplicationInterop.cs
浏览文件 @
4b759636
...
...
@@ -308,7 +308,7 @@ public bool PreFilterMessage(ref SWF.Message msg)
internal
class
WeakReferenceList
<
T
>
where
T
:
class
{
List
<
WeakReference
>
_internalList
;
object
_syncRoot
=
new
object
();
readonly
object
_syncRoot
=
new
object
();
public
WeakReferenceList
()
:
base
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录