Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nice3point committed Jan 2, 2024
1 parent d63d083 commit 9e07b89
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v1
- name: Run Nuke Build
run: ./.nuke/build.cmd PublishGitHub --GitHubToken ${{ secrets.GITHUB_TOKEN }}
run: ./.nuke/build.cmd Compile PublishGitHub --GitHubToken ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sealed partial class Build : NukeBuild
[GitRepository] readonly GitRepository GitRepository;
[Solution(GenerateProjects = true)] readonly Solution Solution;

public static int Main() => Execute<Build>(x => x.Clean);
public static int Main() => Execute<Build>(x => x.Pack);

void ValidateRelease()
{
Expand Down
2 changes: 1 addition & 1 deletion License.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Nice3point
Copyright (c) 2024 Nice3point

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
1 change: 0 additions & 1 deletion Nice3point.Revit.Toolkit/External/ExternalApplication.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.ComponentModel;
using System.Reflection;
using Autodesk.Revit.UI;
using Nice3point.Revit.Toolkit.Helpers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override void Execute(UIApplication uiApplication)

private void HandleIdling(object sender, IdlingEventArgs e)
{
var uiApplication = (UIApplication) sender;
var uiApplication = (UIApplication)sender;
uiApplication.Idling -= HandleIdling;

try
Expand Down
33 changes: 16 additions & 17 deletions Nice3point.Revit.Toolkit/Helpers/ResolveHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ namespace Nice3point.Revit.Toolkit.Helpers;
/// Provides methods to resolve dependencies
/// </summary>
/// <example>
///
/// <code lang="csharp">
/// try
/// {
/// var elementType = typeof(T);
/// ResolveHelper.BeginAssemblyResolve(elementType);
/// return (T)Activator.CreateInstance(elementType);
/// }
/// finally
/// {
/// ResolveHelper.EndAssemblyResolve();
/// }
/// </code>
/// </example>
/// <code lang="csharp">
/// try
/// {
/// var elementType = typeof(T);
/// ResolveHelper.BeginAssemblyResolve(elementType);
/// return (T)Activator.CreateInstance(elementType);
/// }
/// finally
/// {
/// ResolveHelper.EndAssemblyResolve();
/// }
/// </code>
/// </example>
[PublicAPI]
public static class ResolveHelper
{
Expand All @@ -33,7 +32,7 @@ public static class ResolveHelper
/// <remarks>
/// Dependencies are searched in a directory of the specified type.
/// At the time of dependency resolution, all other dependency resolution methods for the domain are disabled,
/// this requires calling <see cref="EndAssemblyResolve"/> immediately after executing user code where dependency failures occur.
/// this requires calling <see cref="EndAssemblyResolve" /> immediately after executing user code where dependency failures occur.
/// </remarks>
public static void BeginAssemblyResolve<T>()
{
Expand All @@ -47,7 +46,7 @@ public static void BeginAssemblyResolve<T>()
/// <remarks>
/// Dependencies are searched in a directory of the specified type.
/// At the time of dependency resolution, all other dependency resolution methods for the domain are disabled,
/// this requires calling <see cref="EndAssemblyResolve"/> immediately after executing user code where dependency failures occur.
/// this requires calling <see cref="EndAssemblyResolve" /> immediately after executing user code where dependency failures occur.
/// </remarks>
public static void BeginAssemblyResolve(Type type)
{
Expand All @@ -65,7 +64,7 @@ public static void BeginAssemblyResolve(Type type)
}

/// <summary>
/// Unsubscribes the current domain to resolve dependencies for the type.
/// Unsubscribes the current domain to resolve dependencies for the type.
/// </summary>
public static void EndAssemblyResolve()
{
Expand Down
9 changes: 4 additions & 5 deletions Nice3point.Revit.Toolkit/Nice3point.Revit.Toolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
<PackageReference Include="Nice3point.Revit.Api.RevitAPIUI" Version="$(RevitVersion).*-*" PrivateAssets="all"/>
</ItemGroup>

<ItemGroup>
<Reference Include="PresentationFramework"/>
</ItemGroup>

<ItemGroup>
<Using Include="JetBrains.Annotations"/>
<Using Include="System.Runtime.CompilerServices"/>
Expand All @@ -83,9 +87,4 @@
<None Include="..\License.md" Link="NuGet\License.md" PackagePath="" Pack="true"/>
</ItemGroup>

<ItemGroup>
<Reference Include="PresentationFramework">
<HintPath>..\..\..\.cache\.nuget\packages\microsoft.netframework.referenceassemblies.net47\1.0.3\build\.NETFramework\v4.7\PresentationFramework.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public FrameworkElementCreator()
/// <summary>
/// Factory to create an instance of a FrameworkElement based on its type using IServiceProvider
/// </summary>
/// <param name="serviceProvider">Instance of the <see cref="IServiceProvider"/>.</param>
/// <param name="serviceProvider">Instance of the <see cref="IServiceProvider" />.</param>
public FrameworkElementCreator(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Nice3point.Revit.Toolkit.Options;

/// <summary>
/// Callback that may be used to control Revit when trying to unload or reload a Revit link with changes in shared coordinates
/// Callback that may be used to control Revit when trying to unload or reload a Revit link with changes in shared coordinates
/// </summary>
[PublicAPI]
public class SaveSharedCoordinatesCallback : ISaveSharedCoordinatesCallback
Expand Down Expand Up @@ -38,11 +38,11 @@ public SaveSharedCoordinatesCallback(Func<RevitLinkType, SaveModifiedLinksOption
}

/// <summary>
/// Determines whether Revit should save the link, not save the link, or discard shared positioning entirely
/// Determines whether Revit should save the link, not save the link, or discard shared positioning entirely
/// </summary>
/// <param name="link">The Revit link which has modified shared coordinates</param>
/// <returns>
/// The options when saving a linked file which has been modified in-memory by shared coordinates operations
/// The options when saving a linked file which has been modified in-memory by shared coordinates operations
/// </returns>
public SaveModifiedLinksOptions GetSaveModifiedLinksOption(RevitLinkType link)
{
Expand Down
8 changes: 3 additions & 5 deletions Nice3point.Revit.Toolkit/Utils/TransactionUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static ITransaction Modify(this Document document)
public static ITransaction Modify(this Document document, [InstantHandle] Func<IDocumentTransactionSettings, ITransactionSettings> settings)
{
var transactionSettings = settings?.Invoke(new DocumentTransactionSettings());
return new Transaction(document, (TransactionSettings) transactionSettings);
return new Transaction(document, (TransactionSettings)transactionSettings);
}

/// <summary>
Expand Down Expand Up @@ -60,7 +60,7 @@ public static ISubTransaction Modify(this Document document, [InstantHandle] Fun
public static IGroupTransaction Modify(this Document document, [InstantHandle] Func<IDocumentTransactionSettings, IGroupTransactionSettings> settings)
{
var transactionSettings = settings?.Invoke(new DocumentTransactionSettings());
return new GroupTransaction(document, (GroupTransactionSettings) transactionSettings);
return new GroupTransaction(document, (GroupTransactionSettings)transactionSettings);
}
}

Expand Down Expand Up @@ -328,9 +328,7 @@ public interface ITransactionSettings
/// </summary>
/// <remarks>SubTransaction does not provide customization settings</remarks>
[PublicAPI]
public interface ISubTransactionSettings
{
}
public interface ISubTransactionSettings;

/// <summary>
/// Contains settings that will be applied before the <see cref="IGroupTransaction" /> starts
Expand Down
1 change: 0 additions & 1 deletion RevitToolkit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Global
{69A95C40-6A3B-4827-9DF3-AB8B79E52F42}.Release R21|Any CPU.ActiveCfg = Release|Any CPU
{69A95C40-6A3B-4827-9DF3-AB8B79E52F42}.Release R22|Any CPU.ActiveCfg = Release|Any CPU
{69A95C40-6A3B-4827-9DF3-AB8B79E52F42}.Release R23|Any CPU.ActiveCfg = Release|Any CPU
{69A95C40-6A3B-4827-9DF3-AB8B79E52F42}.Debug R20|Any CPU.Build.0 = Debug|Any CPU
{63ADFFCF-A009-449E-9F19-2611A01EDFCA}.Debug R24|Any CPU.ActiveCfg = Debug R24|Any CPU
{63ADFFCF-A009-449E-9F19-2611A01EDFCA}.Debug R24|Any CPU.Build.0 = Debug R24|Any CPU
{63ADFFCF-A009-449E-9F19-2611A01EDFCA}.Debug R20|Any CPU.ActiveCfg = Debug R20|Any CPU
Expand Down

0 comments on commit 9e07b89

Please sign in to comment.