Skip to content

Commit

Permalink
Fixes..
Browse files Browse the repository at this point in the history
  • Loading branch information
janno-p committed Feb 15, 2018
1 parent 0e675ec commit 061c6c9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#### 1.1.1 - 15.02.2018

* `MergeContentAttribute` should be usable on fields, parameters and return values.
* Fix `UseXop` detection regression.

#### 1.1.0 - 15.02.2018

* Removed XRoadOptional attribute which is replaced by element, array and array item specific attributes.
Expand Down
2 changes: 1 addition & 1 deletion src/XRoadLib/Attributes/XRoadMergeContentAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace XRoadLib.Attributes
{
[AttributeUsage(AttributeTargets.Property)]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
public class XRoadMergeContentAttribute : Attribute
{ }
}
4 changes: 2 additions & 2 deletions src/XRoadLib/Attributes/XRoadXmlArrayAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ public class XRoadXmlArrayAttribute : XmlArrayAttribute
/// Indicates if this element must occur in serialized XML or not.
/// </summary>
public bool IsOptional { get; set; }

/// <summary>
/// Initializes a new instance of the XmlArrayAttribute class.
/// </summary>
public XRoadXmlArrayAttribute()
{ }

/// <summary>
/// Initializes a new instance of the XmlArrayAttribute class and specifies the XML element name generated
/// in the XML document instance.
Expand Down
2 changes: 1 addition & 1 deletion src/XRoadLib/Schema/ArrayContentDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ArrayContentDefiniton(ParticleDefinition particle, ICustomAttributeProvid
Name = XName.Get((arrayAttribute?.ElementName).GetStringOrDefault(runtimeName), arrayAttribute?.Namespace ?? "");
IsNullable = (arrayAttribute?.IsNullable).GetValueOrDefault();
Order = (arrayAttribute?.Order).GetValueOrDefault(-1);
UseXop = typeof(Stream).GetTypeInfo().IsAssignableFrom(RuntimeType);
UseXop = typeof(Stream).GetTypeInfo().IsAssignableFrom(runtimeType);
TypeName = (arrayItemAttribute?.DataType).MapNotEmpty(x => XName.Get(x, NamespaceConstants.XSD));
IsOptional = xroadArrayAttribute?.IsOptional == true;
State = DefinitionState.Default;
Expand Down
2 changes: 1 addition & 1 deletion src/XRoadLib/Schema/SingularContentDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public SingularContentDefinition(ParticleDefinition particle, ICustomAttributePr
Name = XName.Get((elementAttribute?.ElementName).GetStringOrDefault(runtimeName), elementAttribute?.Namespace ?? "");
IsNullable = (elementAttribute?.IsNullable).GetValueOrDefault();
Order = (elementAttribute?.Order).GetValueOrDefault(-1);
UseXop = typeof(Stream).GetTypeInfo().IsAssignableFrom(RuntimeType);
UseXop = typeof(Stream).GetTypeInfo().IsAssignableFrom(runtimeType);
TypeName = (elementAttribute?.DataType).MapNotEmpty(x => XName.Get(x, NamespaceConstants.XSD));
IsOptional = xroadElementAttribute?.IsOptional == true;
State = DefinitionState.Default;
Expand Down

0 comments on commit 061c6c9

Please sign in to comment.