Skip to content

Commit f59e417

Browse files
committed
Для классов библиотеки запрещаем наследование
1 parent 7aa25f0 commit f59e417

25 files changed

+38
-34
lines changed

src/OneScript.StandardLibrary/XMLSchema/Collections/XMLSchemaSet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This Source Code Form is subject to the terms of the
1818
namespace OneScript.StandardLibrary.XMLSchema.Collections
1919
{
2020
[ContextClass("НаборСхемXML", "XMLSchemaSet")]
21-
public class XMLSchemaSet : AutoCollectionContext<XMLSchemaSet, Objects.XMLSchema>
21+
public sealed class XMLSchemaSet : AutoCollectionContext<XMLSchemaSet, Objects.XMLSchema>
2222
{
2323
private readonly XmlSchemaSet _schemaSet;
2424
private readonly List<Objects.XMLSchema> _items;

src/OneScript.StandardLibrary/XMLSchema/Collections/XSComplexFinalUnion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This Source Code Form is subject to the terms of the
1616
namespace OneScript.StandardLibrary.XMLSchema.Collections
1717
{
1818
[ContextClass("ОбъединениеЗавершенностиСоставногоТипаXS", "XSComplexFinalUnion")]
19-
public class XSComplexFinalUnion : AutoContext<XSComplexFinalUnion>
19+
public sealed class XSComplexFinalUnion : AutoContext<XSComplexFinalUnion>
2020
{
2121
private readonly ArrayImpl _values;
2222

src/OneScript.StandardLibrary/XMLSchema/Collections/XSComponentFixedList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This Source Code Form is subject to the terms of the
1414
namespace OneScript.StandardLibrary.XMLSchema.Collections
1515
{
1616
[ContextClass("ФиксированныйСписокКомпонентXS", "XSComponentFixedList")]
17-
public class XSComponentFixedList : AutoCollectionContext<XSComponentFixedList, IXSComponent>
17+
public sealed class XSComponentFixedList : AutoCollectionContext<XSComponentFixedList, IXSComponent>
1818
{
1919

2020
private readonly List<IXSComponent> _items;

src/OneScript.StandardLibrary/XMLSchema/Collections/XSComponentList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This Source Code Form is subject to the terms of the
1717
namespace OneScript.StandardLibrary.XMLSchema.Collections
1818
{
1919
[ContextClass("СписокКомпонентXS", "XSComponentList")]
20-
public class XSComponentList : AutoCollectionContext<XSComponentList, IXSComponent>
20+
public sealed class XSComponentList : AutoCollectionContext<XSComponentList, IXSComponent>
2121
{
2222
private readonly List<IXSComponent> _items;
2323

src/OneScript.StandardLibrary/XMLSchema/Collections/XSNamedComponentMap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This Source Code Form is subject to the terms of the
1818
namespace OneScript.StandardLibrary.XMLSchema.Collections
1919
{
2020
[ContextClass("КоллекцияИменованныхКомпонентXS", "XSNamedComponentMap")]
21-
public class XSNamedComponentMap : AutoCollectionContext<XSNamedComponentMap, IXSNamedComponent>
21+
public sealed class XSNamedComponentMap : AutoCollectionContext<XSNamedComponentMap, IXSNamedComponent>
2222
{
2323
private readonly List<IXSNamedComponent> _items;
2424

src/OneScript.StandardLibrary/XMLSchema/Collections/XSProhibitedSubstitutionsUnion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This Source Code Form is subject to the terms of the
1616
namespace OneScript.StandardLibrary.XMLSchema.Collections
1717
{
1818
[ContextClass("ОбъединениеЗапрещенныхПодстановокXS", "XSProhibitedSubstitutionsUnion")]
19-
public class XsProhibitedSubstitutionsUnion : AutoContext<XsProhibitedSubstitutionsUnion>
19+
public sealed class XsProhibitedSubstitutionsUnion : AutoContext<XsProhibitedSubstitutionsUnion>
2020
{
2121
private readonly ArrayImpl _values;
2222

src/OneScript.StandardLibrary/XMLSchema/Collections/XSSubstitutionGroupExclusionsUnion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This Source Code Form is subject to the terms of the
1616
namespace OneScript.StandardLibrary.XMLSchema.Collections
1717
{
1818
[ContextClass("ОбъединениеИсключенийГруппПодстановкиXS", "XSSubstitutionGroupExclusionsUnion")]
19-
public class XsSubstitutionGroupExclusionsUnion : AutoContext<XsSubstitutionGroupExclusionsUnion>
19+
public sealed class XsSubstitutionGroupExclusionsUnion : AutoContext<XsSubstitutionGroupExclusionsUnion>
2020
{
2121
private readonly ArrayImpl _values;
2222
private bool Contains(XmlSchemaDerivationMethod value)

src/OneScript.StandardLibrary/XMLSchema/Enumerations/XSComplexFinal.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This Source Code Form is subject to the terms of the
1414

1515
namespace OneScript.StandardLibrary.XMLSchema.Enumerations
1616
{
17-
public class XSComplexFinal : EnumerationValue
17+
public sealed class XSComplexFinal : EnumerationValue
1818
{
1919
private readonly XmlSchemaDerivationMethod _derivationMethod;
2020
public XSComplexFinal(EnumerationContext owner, XmlSchemaDerivationMethod derivationMethod)
@@ -28,7 +28,7 @@ public static XmlSchemaDerivationMethod ToNativeValue(XSComplexFinal wrapper)
2828
}
2929

3030
[SystemEnum("ЗавершенностьСоставногоТипаXS", "XSComplexFinal")]
31-
public class EnumerationXSComplexFinal : EnumerationContext
31+
public sealed class EnumerationXSComplexFinal : EnumerationContext
3232
{
3333
private readonly Dictionary<XmlSchemaDerivationMethod, XSComplexFinal> _valuesCache;
3434

@@ -70,6 +70,4 @@ public static EnumerationXSComplexFinal CreateInstance(ITypeManager typeManager)
7070
}
7171
}
7272

73-
74-
75-
}
73+
}

src/OneScript.StandardLibrary/XMLSchema/Enumerations/XSContentModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@ public enum XSContentModel
1818
[EnumValue("EmptyRef", "ПустаяСсылка")]
1919
EmptyRef,
2020

21+
/// <summary>
22+
/// Простая модель содержания.
23+
/// </summary>
2124
[EnumValue("Simple", "Простая")]
2225
Simple,
2326

27+
/// <summary>
28+
/// Составная модель содержания.
29+
/// </summary>
2430
[EnumValue("Complex", "Составная")]
2531
Complex
2632
}

src/OneScript.StandardLibrary/XMLSchema/Enumerations/XSDisallowedSubstitutions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This Source Code Form is subject to the terms of the
1414

1515
namespace OneScript.StandardLibrary.XMLSchema.Enumerations
1616
{
17-
public class XSDisallowedSubstitutions : ClrEnumValueWrapper<XmlSchemaDerivationMethod>
17+
public sealed class XSDisallowedSubstitutions : ClrEnumValueWrapper<XmlSchemaDerivationMethod>
1818
{
1919
internal XSDisallowedSubstitutions(EnumerationXSDisallowedSubstitutions instance, XmlSchemaDerivationMethod realValue)
2020
: base(instance, realValue)
@@ -29,7 +29,7 @@ public static XmlSchemaDerivationMethod ToNativeValue(XSDisallowedSubstitutions
2929
}
3030

3131
[SystemEnum("НедопустимыеПодстановкиXS", "XSDisallowedSubstitutions")]
32-
public class EnumerationXSDisallowedSubstitutions : EnumerationContext
32+
public sealed class EnumerationXSDisallowedSubstitutions : EnumerationContext
3333
{
3434

3535
private readonly Dictionary<XmlSchemaDerivationMethod, XSDisallowedSubstitutions> _valuesCache;

0 commit comments

Comments
 (0)