Questions tagged [contracts]

63 questions
2
votes
0 answers

raw transaction not broadcasting

I am currently writing a function to create and broadcast a raw ethereum transaction. I am able to successfully generate the raw transaction but when I go to send it off to the network it is not processed. Below is my code: function…
Jim
  • 171
  • 1
  • 6
2
votes
0 answers

Will the Windows 10 "Search Contract" let me show results in the start menu?

I'm thinking it would be a neat idea to be able to provide search extensions to the start menu (say, so typing in the start menu also searches articles on a website). Is this what the Windows Ten search contract is for? From their API documentation…
2
votes
1 answer

Putting Contracts for Constructor Arguments

Assume we have an interface as follows with the contract class [ContractClassFor(typeof(Custom))] public abstract class CustomContract : Custom { public string GetPerson(int i) { Contract.Requires(i > 0); …
Frank Q.
  • 6,001
  • 11
  • 47
  • 62
2
votes
2 answers

Contracts vs Exceptions

Let's assume I have the following code: public class MainClass { public static void main(String[] args) { System.out.println(sumNumbers(10, 10)); } //@requires a >= 10; //@ensures \result < 0; public static int…
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
2
votes
1 answer

Is there any value in separating wcf service contracts from your interface definition?

I have an interface ICustomerService: public interface ICustomerService { CustomerList FindAll(); } and a concrete class implementing that interface. Now I need to expose the method over the web using wcf/rest and I've had to change the…
darthjit
  • 1,555
  • 13
  • 20
2
votes
1 answer

What to write in this contract

I'm designing a academic decision support system. I have to write documentation for that project. The part I am stuck on is writing contracts. I've a use case Generate custom reports. The interaction the user will do with the system is…
user1901398
  • 61
  • 1
  • 3
  • 7
1
vote
2 answers

Term for "open" number of hours for an assigned person/resource on an IT contract?

Quick question...my wife is drafting a small agreement for her the IT company she works for to work with another IT company in which her company will lend or assign programmers, without limiting or specifying the length of time that the resource…
GR7
  • 5,083
  • 8
  • 48
  • 66
1
vote
1 answer

WCF Add Service Reference

I am wanting to know how to add more then just one interface type in a service. at the moment i can only get one to show . I have a few other interfaces i would like to see appear under the service list, How do i do this? Just found out that because…
1
vote
1 answer

False Negative Unit Test with Pex, Contracts, and QuickGraph

everyone. I have a perplexing interaction between contracts, pex, and quickgraph and would be very grateful for advice from the more knowledgeable. I have boiled it down to a repro case where commenting out one contract makes the false negative go…
Reb.Cabin
  • 5,426
  • 3
  • 35
  • 64
1
vote
1 answer

Java Pact.io DSL for List of maps

i have to create a pact dsl part to match the json to be serialized into the following java object: List>> attributes = new ArrayList<>(); Currently i have following pact dsl part which is not working: …
Alagesan Palani
  • 1,984
  • 4
  • 28
  • 53
1
vote
1 answer

Inform resharper that an out variable will only be null if the function returns false;

I have the following function that follows the TryGet pattern with an out param that if null will return false, if it is not null it will return true public bool TryGetFileFormat(string extension, [CanBeNull] out IFileFormat fileFormatter) { …
rollsch
  • 2,518
  • 4
  • 39
  • 65
1
vote
1 answer

Reference local type in pycontract

I'm trying to use PyContracts within a web application, so I have lots of custom-defined classes being passed around that I simply want to type check alongside other more traditional argument types. I'd like to use contractual programming…
scnerd
  • 5,836
  • 2
  • 21
  • 36
1
vote
1 answer

C# Contracts vs NotNull/roll your own in Java

I would like to reduce redundant and verbose null checks in Java , but I understand Java does not have a standard @NotNull annotation where as c# has contracts that can be used, such as Contract.Requires( x != null ); I might be missing something,…
Gonen I
  • 5,576
  • 1
  • 29
  • 60
1
vote
2 answers

Code Contracts vs Code Analyzers

I'm about to embark on a new C# project. I was wondering what the difference is between using Code Contracts or Code Analyzers (in Roslyn). Am I misunderstanding the usage of each? Being a new project, I would like to maintain the integrity of the…
Jon Meyers
  • 45
  • 6
1
vote
0 answers

Changing a Contract Status to expired

I am currently doing some research regarding the Contracts module of Maximo. My question is as follows. How do you change a contract status to expired in Maximo? We are currently using versions 7.508 and 7.602. From what I have found so far it is…
Ben S
  • 11
  • 4