OptionalDependencyAttribute.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * Copyright (c) 2021 Vuplex Inc. All rights reserved.
  3. *
  4. * Licensed under the Vuplex Commercial Software Library License, you may
  5. * not use this file except in compliance with the License. You may obtain
  6. * a copy of the License at
  7. *
  8. * https://vuplex.com/commercial-library-license
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. using System;
  17. using System.Diagnostics;
  18. namespace Vuplex.WebView.ConditionalCompilation {
  19. /// <summary>
  20. /// From the example of how to use Unity's ConditionalCompilationUtility:
  21. /// https://github.com/Unity-Technologies/ConditionalCompilationUtility/tree/f364090bbda3728e1662074c969c2b7c3c34199b
  22. /// </summary>
  23. [Conditional("VUPLEX_CCU")]
  24. [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
  25. public class OptionalDependencyAttribute : Attribute {
  26. public string dependentClass;
  27. public string define;
  28. public OptionalDependencyAttribute(string dependentClass, string define) {
  29. this.dependentClass = dependentClass;
  30. this.define = define;
  31. }
  32. }
  33. }