Skip to content

Commit

Permalink
[src] Run 'make format-csproj'.
Browse files Browse the repository at this point in the history
This runs 'dotnet format' on the generated project files, which will format
code inside #if blocks (which 'dotnet format --folder ...' doesn't).

This is a code formatting update only, no functional changes.
  • Loading branch information
rolfbjarne committed Jan 16, 2025
1 parent 0e6a5b5 commit d385b4b
Show file tree
Hide file tree
Showing 219 changed files with 4,389 additions and 4,539 deletions.
2 changes: 1 addition & 1 deletion src/AVFoundation/AVAssetDownloadStorageManagementPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public virtual AVAssetDownloadedAssetEvictionPriority Priority {
}

public partial class AVMutableAssetDownloadStorageManagementPolicy {

public override AVAssetDownloadedAssetEvictionPriority Priority {
get { return AVAssetDownloadedAssetEvictionPriorityExtensions.GetValue (_Priority); }
set { _Priority = value.GetConstant () ?? throw new ArgumentOutOfRangeException (nameof (Priority)); }
Expand Down
4 changes: 2 additions & 2 deletions src/AVFoundation/AVCaptureMetadataOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
namespace AVFoundation {

public partial class AVCaptureMetadataOutput {

public AVMetadataObjectType AvailableMetadataObjectTypes {
get { return AVMetadataObjectTypeExtensions.ToFlags (WeakAvailableMetadataObjectTypes); }
}

public AVMetadataObjectType MetadataObjectTypes {
public AVMetadataObjectType MetadataObjectTypes {
get { return AVMetadataObjectTypeExtensions.ToFlags (WeakMetadataObjectTypes); }
set { WeakMetadataObjectTypes = value.ToArray (); }
}
Expand Down
4 changes: 2 additions & 2 deletions src/AVFoundation/AVMetadataMachineReadableCodeObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@

namespace AVFoundation {
public partial class AVMetadataMachineReadableCodeObject {
public CGPoint[]? Corners {
public CGPoint []? Corners {
get {
var arr = WeakCorners;
if (arr is null)
return null;
var rv = new CGPoint[arr.Length];
var rv = new CGPoint [arr.Length];
for (int i = 0; i < rv.Length; i++) {
var dict = arr [i];
CGPoint pnt;
Expand Down
6 changes: 3 additions & 3 deletions src/AVFoundation/AVOutputSettingsAssistant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ public AVOutputSettingsAssistant? Preset640x480 {
return FromPreset (_Preset640x480);
}
}

public AVOutputSettingsAssistant? Preset960x540 {
get {
return FromPreset (_Preset960x540);
}
}

public AVOutputSettingsAssistant? Preset1280x720 {
get {
return FromPreset (_Preset1280x720);
}
}

public AVOutputSettingsAssistant? Preset1920x1080 {
get {
return FromPreset (_Preset1920x1080);
Expand Down
2 changes: 1 addition & 1 deletion src/AVRouting/AVCustomDeviceRoute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace AVRouting {
partial class AVCustomDeviceRoute {

public NWEndpoint NetworkEndpoint => new NWEndpoint (_NetworkEndpoint, owns: false);
public NWEndpoint NetworkEndpoint => new NWEndpoint (_NetworkEndpoint, owns: false);

}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Accessibility/AXSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static bool IsAssistiveAccessEnabled {
[SupportedOSPlatform ("macos15.0")]
[SupportedOSPlatform ("tvos18.0")]
[DllImport (Constants.AccessibilityLibrary)]
unsafe static extern void AXOpenSettingsFeature (nint /* AXSettingsFeature */ feature, BlockLiteral *block);
unsafe static extern void AXOpenSettingsFeature (nint /* AXSettingsFeature */ feature, BlockLiteral* block);

/// <summary>Open the Settings app to the specified section.</summary>
/// <param name="feature">The section to open.</param>
Expand Down
2 changes: 1 addition & 1 deletion src/AddressBook/ABAddressBook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static InitConstants ()
{
#if __MACCATALYST__
// avoid TypeLoadException if used before macOS 11.x
if (!SystemVersion.CheckiOS (14,0))
if (!SystemVersion.CheckiOS (14, 0))
return;
#endif
// ensure we can init. This is needed before iOS6 (as per doc).
Expand Down
4 changes: 2 additions & 2 deletions src/AppKit/Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ namespace AppKit {
#if MONOMAC
// Class to access C functions
public partial class AppKitFramework {

[DllImport (Constants.AppKitLibrary)]
public static extern void NSBeep();
public static extern void NSBeep ();
}
#endif
}
4 changes: 2 additions & 2 deletions src/AppKit/NSGraphics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public static void FrameRect (CGRect rect, nfloat frameWidth, NSCompositingOpera

#if NET
[SupportedOSPlatform ("macos")]
[ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead." )]
[ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead.")]
#else
[Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'NSCursor.DisappearingItemCursor' instead.")]
#endif
Expand All @@ -190,7 +190,7 @@ public static void FrameRect (CGRect rect, nfloat frameWidth, NSCompositingOpera

#if NET
[SupportedOSPlatform ("macos")]
[ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead." )]
[ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead.")]
#else
[Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'NSCursor.DisappearingItemCursor' instead.")]
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/AppKit/NSPasteboardReading.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace AppKit {
public partial interface INSPasteboardReading {
[BindingImpl (BindingImplOptions.Optimizable)]
public unsafe static T? CreateInstance<T> (NSObject propertyList, NSPasteboardType type) where T: NSObject, INSPasteboardReading
public unsafe static T? CreateInstance<T> (NSObject propertyList, NSPasteboardType type) where T : NSObject, INSPasteboardReading
{
return CreateInstance<T> (propertyList, type.GetConstant ()!);
}
Expand Down
4 changes: 2 additions & 2 deletions src/AudioToolbox/AudioConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,13 @@ AudioConverterError FillComplexBuffer (ref int outputDataPacketSize,
var packetSize = outputDataPacketSize;
int* packetSizePtr = &packetSize;
if (packetDescription is null) {
var returnOne = AudioConverterFillComplexBuffer (Handle, &FillComplexBufferShared, this_ptr, (IntPtr)packetSizePtr, (IntPtr) outputData, IntPtr.Zero);
var returnOne = AudioConverterFillComplexBuffer (Handle, &FillComplexBufferShared, this_ptr, (IntPtr) packetSizePtr, (IntPtr) outputData, IntPtr.Zero);
outputDataPacketSize = packetSize;
return returnOne;
}

fixed (AudioStreamPacketDescription* pdesc = packetDescription) {
var returnTwo = AudioConverterFillComplexBuffer (Handle, &FillComplexBufferShared, this_ptr, (IntPtr)packetSizePtr, (IntPtr) outputData, (IntPtr) pdesc);
var returnTwo = AudioConverterFillComplexBuffer (Handle, &FillComplexBufferShared, this_ptr, (IntPtr) packetSizePtr, (IntPtr) outputData, (IntPtr) pdesc);
outputDataPacketSize = packetSize;
return returnTwo;
}
Expand Down
2 changes: 1 addition & 1 deletion src/AudioToolbox/AudioFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ public IntPtr GetProperty (AudioFileProperty property, out int size)
return IntPtr.Zero;
}
#if NET
unsafe T? GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioFileProperty property) where T : unmanaged
unsafe T? GetProperty<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioFileProperty property) where T : unmanaged
#else
unsafe T? GetProperty<T> (AudioFileProperty property) where T : unmanaged
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/AudioToolbox/AudioFileStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ long GetLong (AudioFileStreamProperty property)
}

#if NET
unsafe T? GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioFileStreamProperty property) where T : unmanaged
unsafe T? GetProperty<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioFileStreamProperty property) where T : unmanaged
#else
unsafe T? GetProperty<T> (AudioFileStreamProperty property) where T : unmanaged
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/AudioToolbox/AudioQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ public IntPtr GetProperty (AudioQueueProperty property, out int size)

// Should be private
#if NET
public unsafe T GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioQueueProperty property) where T : struct
public unsafe T GetProperty<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioQueueProperty property) where T : struct
#else
public unsafe T GetProperty<T> (AudioQueueProperty property) where T : struct
#endif
Expand Down Expand Up @@ -1016,7 +1016,7 @@ public unsafe T GetProperty<T> (AudioQueueProperty property) where T : struct
}

#if NET
unsafe T GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioConverterPropertyID property) where T : struct
unsafe T GetProperty<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioConverterPropertyID property) where T : struct
#else
unsafe T GetProperty<T> (AudioConverterPropertyID property) where T : struct
#endif
Expand Down Expand Up @@ -1189,7 +1189,7 @@ public AudioStreamBasicDescription AudioStreamDescription {
#if !MONOMAC
return GetProperty<AudioStreamBasicDescription> (AudioQueueProperty.StreamDescription);
#else
return GetProperty <AudioStreamBasicDescription> (AudioConverterPropertyID.CurrentInputStreamDescription);
return GetProperty<AudioStreamBasicDescription> (AudioConverterPropertyID.CurrentInputStreamDescription);
#endif
}
}
Expand Down Expand Up @@ -1296,7 +1296,7 @@ extern static AudioQueueStatus AudioQueueProcessingTapNew (IntPtr inAQ, AudioQue
#if NET
unsafe {
status = AudioQueueProcessingTapNew (handle, &AudioQueueProcessingTap.TapCallback, GCHandle.ToIntPtr (aqpt.Handle), flags, &maxFrames,
&processingFormat, &tapHandle);
&processingFormat, &tapHandle);
}
#else
status = AudioQueueProcessingTapNew (handle, AudioQueueProcessingTap.CreateTapCallback, GCHandle.ToIntPtr (aqpt.Handle), flags, out maxFrames,
Expand Down Expand Up @@ -1459,7 +1459,7 @@ public class OutputAudioQueue : AudioQueue {
#if NET
[DllImport (Constants.AudioToolboxLibrary)]
extern unsafe static OSStatus AudioQueueNewOutput (AudioStreamBasicDescription* format, delegate* unmanaged<IntPtr, IntPtr, IntPtr, void> callback,
IntPtr userData, IntPtr cfrunLoop_callbackRunloop, IntPtr cfstr_runMode,
IntPtr userData, IntPtr cfrunLoop_callbackRunloop, IntPtr cfstr_runMode,
uint flags, IntPtr* audioQueue);
#else
static readonly AudioQueueOutputCallback dOutputCallback = output_callback;
Expand Down
2 changes: 1 addition & 1 deletion src/AudioToolbox/MusicTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public MusicPlayerStatus GetDestMidiEndpoint (out MidiEndpoint? outEndpoint)
unsafe {
result = MusicTrackGetDestMIDIEndpoint (Handle, &midiHandle);
}
outEndpoint = (result == MusicPlayerStatus.Success)? new MidiEndpoint (midiHandle): null;
outEndpoint = (result == MusicPlayerStatus.Success) ? new MidiEndpoint (midiHandle) : null;
return result;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/AudioToolbox/SystemSound.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public AudioServicesError AddSystemSoundCompletion (Action routine, CFRunLoop? r
runLoop.GetHandle (),
IntPtr.Zero, // runLoopMode should be enum runLoopMode.GetHandle (),
#if NET
&SoundCompletionShared,
&SoundCompletionShared,
#else
SoundCompletionCallback,
#endif
Expand Down
60 changes: 30 additions & 30 deletions src/AudioUnit/AUEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,16 +505,16 @@ public enum AudioUnitParameterType // UInt32 in AudioUnitParameterInfo
Mixer3DGain = 3,
Mixer3DPlaybackRate = 4,
#if MONOMAC
Mixer3DReverbBlend = 5,
Mixer3DGlobalReverbGain = 6,
Mixer3DOcclusionAttenuation = 7,
Mixer3DObstructionAttenuation = 8,
Mixer3DMinGain = 9,
Mixer3DMaxGain = 10,
Mixer3DPreAveragePower = 1000,
Mixer3DPrePeakHoldLevel = 2000,
Mixer3DPostAveragePower = 3000,
Mixer3DPostPeakHoldLevel = 4000,
Mixer3DReverbBlend = 5,
Mixer3DGlobalReverbGain = 6,
Mixer3DOcclusionAttenuation = 7,
Mixer3DObstructionAttenuation = 8,
Mixer3DMinGain = 9,
Mixer3DMaxGain = 10,
Mixer3DPreAveragePower = 1000,
Mixer3DPrePeakHoldLevel = 2000,
Mixer3DPostAveragePower = 3000,
Mixer3DPostPeakHoldLevel = 4000,
#else
Mixer3DEnable = 5,
Mixer3DMinGain = 6,
Expand Down Expand Up @@ -563,8 +563,8 @@ public enum AudioUnitParameterType // UInt32 in AudioUnitParameterInfo
// AUTimePitch, AUTimePitch (offline), AUPitch units
TimePitchRate = 0,
#if MONOMAC
TimePitchPitch = 1,
TimePitchEffectBlend = 2,
TimePitchPitch = 1,
TimePitchEffectBlend = 2,
#endif

// AUNewTimePitch
Expand Down Expand Up @@ -969,24 +969,24 @@ public enum AudioUnitSubType : uint {
AudioFilePlayer = 0x6166706C, // 'afpl'

#if MONOMAC
HALOutput = 0x6168616C, // 'ahal'
DefaultOutput = 0x64656620, // 'def '
SystemOutput = 0x73797320, // 'sys '
DLSSynth = 0x646C7320, // 'dls '
TimePitch = 0x746D7074, // 'tmpt'
GraphicEQ = 0x67726571, // 'greq'
MultiBandCompressor = 0x6D636D70, // 'mcmp'
MatrixReverb = 0x6D726576, // 'mrev'
Pitch = 0x746D7074, // 'tmpt'
AUFilter = 0x66696C74, // 'filt
NetSend = 0x6E736E64, // 'nsnd'
RogerBeep = 0x726F6772, // 'rogr'
StereoMixer = 0x736D7872, // 'smxr'
SphericalHeadPanner = 0x73706872, // 'sphr'
VectorPanner = 0x76626173, // 'vbas'
SoundFieldPanner = 0x616D6269, // 'ambi'
HRTFPanner = 0x68727466, // 'hrtf'
NetReceive = 0x6E726376, // 'nrcv'
HALOutput = 0x6168616C, // 'ahal'
DefaultOutput = 0x64656620, // 'def '
SystemOutput = 0x73797320, // 'sys '
DLSSynth = 0x646C7320, // 'dls '
TimePitch = 0x746D7074, // 'tmpt'
GraphicEQ = 0x67726571, // 'greq'
MultiBandCompressor = 0x6D636D70, // 'mcmp'
MatrixReverb = 0x6D726576, // 'mrev'
Pitch = 0x746D7074, // 'tmpt'
AUFilter = 0x66696C74, // 'filt
NetSend = 0x6E736E64, // 'nsnd'
RogerBeep = 0x726F6772, // 'rogr'
StereoMixer = 0x736D7872, // 'smxr'
SphericalHeadPanner = 0x73706872, // 'sphr'
VectorPanner = 0x76626173, // 'vbas'
SoundFieldPanner = 0x616D6269, // 'ambi'
HRTFPanner = 0x68727466, // 'hrtf'
NetReceive = 0x6E726376, // 'nrcv'
#endif
}

Expand Down
8 changes: 4 additions & 4 deletions src/AudioUnit/AUGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public AudioUnitStatus RemoveRenderNotify (RenderDelegate callback)
#if NET
unsafe {
if (graphUserCallbacks.Count == 0)
error = (AudioUnitStatus)AUGraphRemoveRenderNotify (Handle, &renderCallback, GCHandle.ToIntPtr (gcHandle));
error = (AudioUnitStatus) AUGraphRemoveRenderNotify (Handle, &renderCallback, GCHandle.ToIntPtr (gcHandle));
}
#else
if (graphUserCallbacks.Count == 0)
Expand All @@ -201,7 +201,7 @@ static CallbackShared static_CallbackShared {

#if NET
[UnmanagedCallersOnly]
static unsafe AudioUnitStatus renderCallback(IntPtr inRefCon,
static unsafe AudioUnitStatus renderCallback (IntPtr inRefCon,
AudioUnitRenderActionFlags* _ioActionFlags,
AudioTimeStamp* _inTimeStamp,
uint _inBusNumber,
Expand Down Expand Up @@ -530,14 +530,14 @@ protected override void Dispose (bool disposing)

[DllImport (Constants.AudioToolboxLibrary)]
#if NET
static unsafe extern int AUGraphAddRenderNotify (IntPtr inGraph, delegate* unmanaged<IntPtr, AudioUnitRenderActionFlags*, AudioTimeStamp*, uint, uint, IntPtr, AudioUnitStatus> inCallback, IntPtr inRefCon );
static unsafe extern int AUGraphAddRenderNotify (IntPtr inGraph, delegate* unmanaged<IntPtr, AudioUnitRenderActionFlags*, AudioTimeStamp*, uint, uint, IntPtr, AudioUnitStatus> inCallback, IntPtr inRefCon);
#else
static extern int AUGraphAddRenderNotify (IntPtr inGraph, CallbackShared inCallback, IntPtr inRefCon);
#endif

#if NET
[DllImport (Constants.AudioToolboxLibrary)]
static unsafe extern int AUGraphRemoveRenderNotify (IntPtr inGraph, delegate* unmanaged<IntPtr, AudioUnitRenderActionFlags*, AudioTimeStamp*, uint, uint, IntPtr, AudioUnitStatus> inCallback, IntPtr inRefCon );
static unsafe extern int AUGraphRemoveRenderNotify (IntPtr inGraph, delegate* unmanaged<IntPtr, AudioUnitRenderActionFlags*, AudioTimeStamp*, uint, uint, IntPtr, AudioUnitStatus> inCallback, IntPtr inRefCon);
#else
[DllImport (Constants.AudioToolboxLibrary)]
static extern int AUGraphRemoveRenderNotify (IntPtr inGraph, CallbackShared inCallback, IntPtr inRefCon);
Expand Down
Loading

0 comments on commit d385b4b

Please sign in to comment.