-
Notifications
You must be signed in to change notification settings - Fork 12
Fix obsolete GetRdfTypes usage in samples #608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1caa72f
30cda2c
5ef0156
5b1b1de
1b60c4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,7 +147,7 @@ public Uri GetInstanceShape() | |
| [Obsolete("User GetTypes() or .Types instead")] | ||
| public Uri[] GetRdfTypes() | ||
| { | ||
| return GetTypes().ToArray(); | ||
| return Types.ToArray(); | ||
| } | ||
|
Comment on lines
147
to
151
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: rg -n '"User [GS]etTypes' --type=csRepository: OSLC/oslc4net Length of output: 2210 Fix typo in Multiple resource files contain the typo This appears in 9 resource files with 18 total occurrences (2 per file):
🤖 Prompt for AI Agents |
||
|
|
||
| [OslcDescription("A short string representation for the type, example 'Defect'.")] | ||
|
|
@@ -236,7 +236,7 @@ public void SetModified(DateTime? modified) | |
| [Obsolete("User SetTypes() or .Types instead")] | ||
| public void SetRdfTypes(Uri[] rdfTypes) | ||
| { | ||
| SetTypes(rdfTypes); | ||
| Types = rdfTypes; | ||
|
Comment on lines
236
to
+239
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same typo in the setter's
🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| public void SetDctermsTypes(string[] dctermsTypes) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -390,7 +390,7 @@ public Uri[] GetCreators() | |
| [Obsolete("User GetTypes() or .Types instead")] | ||
| public Uri[] GetRdfTypes() | ||
| { | ||
| return GetTypes().ToArray(); | ||
| return Types.ToArray(); | ||
| } | ||
|
Comment on lines
390
to
394
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same "User" → "Use" typo as in other resource files. 🤖 Prompt for AI Agents |
||
|
|
||
| [OslcDescription("The scope of a resource is a Uri for the resource's OSLC Service Provider.")] | ||
|
|
@@ -611,7 +611,7 @@ public void SetModified(DateTime? modified) | |
| [Obsolete("User SetTypes() or .Types instead")] | ||
| public void SetRdfTypes(Uri[] rdfTypes) | ||
| { | ||
| SetTypes(rdfTypes); | ||
| Types = rdfTypes; | ||
| } | ||
|
|
||
| public void SetServiceProvider(Uri? serviceProvider) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,29 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2012 IBM Corporation. | ||
| * Copyright (c) 2025 Andrii Berezovskyi and OSLC4Net contributors. | ||
| * | ||
| * All rights reserved. This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License v1.0 | ||
| * and Eclipse Distribution License v. 1.0 which accompanies this distribution. | ||
| * | ||
| * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | ||
| * and the Eclipse Distribution License is available at | ||
| * http://www.eclipse.org/org/documents/edl-v10.php. | ||
| *******************************************************************************/ | ||
| using System.Reflection; | ||
| using OSLC4Net.Core.Attribute; | ||
| using OSLC4Net.Core.Model; | ||
| namespace OSLC4Net.Core.Exceptions; | ||
| public class OslcCoreInvalidOccursException( | ||
| Type resourceType, | ||
| MethodInfo method, | ||
| OslcOccurs oslcOccurs) : OslcCoreApplicationException( | ||
| $"OSLC1003: Invalid occurs annotation {OccursExtension.ToString(oslcOccurs.value)} for method {method.Name} of class {resourceType.Name}") | ||
| { | ||
| public Type ResourceType { get; } = resourceType; | ||
| public MethodInfo Method { get; } = method; | ||
| public OslcOccurs OslcOccurs { get; } = oslcOccurs; | ||
| } | ||
| /******************************************************************************* | ||
| * Copyright (c) 2012 IBM Corporation. | ||
| * Copyright (c) 2025 Andrii Berezovskyi and OSLC4Net contributors. | ||
| * | ||
| * All rights reserved. This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License v1.0 | ||
| * and Eclipse Distribution License v. 1.0 which accompanies this distribution. | ||
| * | ||
| * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | ||
| * and the Eclipse Distribution License is available at | ||
| * http://www.eclipse.org/org/documents/edl-v10.php. | ||
| *******************************************************************************/ | ||
|
|
||
| using System.Reflection; | ||
| using OSLC4Net.Core.Attribute; | ||
| using OSLC4Net.Core.Model; | ||
|
|
||
| namespace OSLC4Net.Core.Exceptions; | ||
|
|
||
| public class OslcCoreInvalidOccursException( | ||
| Type resourceType, | ||
| MemberInfo method, | ||
| OslcOccurs oslcOccurs) : OslcCoreApplicationException( | ||
| $"OSLC1003: Invalid occurs annotation {OccursExtension.ToString(oslcOccurs.value)} for method {method.Name} of class {resourceType.Name}") | ||
| { | ||
| public Type ResourceType { get; } = resourceType; | ||
| public MemberInfo Method { get; } = method; | ||
| public OslcOccurs OslcOccurs { get; } = oslcOccurs; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,28 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2012 IBM Corporation. | ||
| * Copyright (c) 2025 Andrii Berezovskyi and OSLC4Net contributors. | ||
| * | ||
| * All rights reserved. This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License v1.0 | ||
| * and Eclipse Distribution License v. 1.0 which accompanies this distribution. | ||
| * | ||
| * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | ||
| * and the Eclipse Distribution License is available at | ||
| * http://www.eclipse.org/org/documents/edl-v10.php. | ||
| *******************************************************************************/ | ||
| using System.Reflection; | ||
| using OSLC4Net.Core.Model; | ||
| namespace OSLC4Net.Core.Exceptions; | ||
| public class OslcCoreInvalidRepresentationException( | ||
| Type resourceType, | ||
| MethodInfo method, | ||
| Representation representation) : OslcCoreApplicationException( | ||
| $"OSLC1006: Invalid representation {RepresentationExtension.ToString(representation)} defined for method {method.Name} of class {resourceType.Name}") | ||
| { | ||
| public Type ResourceType { get; } = resourceType; | ||
| public MethodInfo Method { get; } = method; | ||
| public Representation Representation { get; } = representation; | ||
| } | ||
| /******************************************************************************* | ||
| * Copyright (c) 2012 IBM Corporation. | ||
| * Copyright (c) 2025 Andrii Berezovskyi and OSLC4Net contributors. | ||
| * | ||
| * All rights reserved. This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License v1.0 | ||
| * and Eclipse Distribution License v. 1.0 which accompanies this distribution. | ||
| * | ||
| * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | ||
| * and the Eclipse Distribution License is available at | ||
| * http://www.eclipse.org/org/documents/edl-v10.php. | ||
| *******************************************************************************/ | ||
|
|
||
| using System.Reflection; | ||
| using OSLC4Net.Core.Model; | ||
|
|
||
| namespace OSLC4Net.Core.Exceptions; | ||
|
|
||
| public class OslcCoreInvalidRepresentationException( | ||
| Type resourceType, | ||
| MemberInfo method, | ||
| Representation representation) : OslcCoreApplicationException( | ||
| $"OSLC1006: Invalid representation {RepresentationExtension.ToString(representation)} defined for method {method.Name} of class {resourceType.Name}") | ||
| { | ||
| public Type ResourceType { get; } = resourceType; | ||
| public MemberInfo Method { get; } = method; | ||
| public Representation Representation { get; } = representation; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in
[Obsolete]message: "User" → "Use".The obsolete attribute messages on lines 147 and 212 say
"User GetTypes()..."and"User SetTypes()..."— should be"Use". This same typo is repeated across all resource files in this PR (AutomationPlan, AutomationRequest, AutomationResult, ParameterInstance, QmResource, and both ChangeRequest files).Proposed fix (this file)
📝 Committable suggestion
🤖 Prompt for AI Agents